Commit Graph
50 Commits
Author SHA1 Message Date
Kay Simmons aef8027049 fix replace in normal and visual modes 2023-01-11 14:57:40 -08:00
Kay Simmons 974b07e043 in progress 2023-01-11 12:10:55 -08:00
Kay Simmons 4da1890a54 working f and t bindings 2023-01-06 14:24:20 -08:00
Kay Simmons acac7d292d Refactor editor scrolling and implement scroll commands from vim mode 2022-12-07 16:39:32 -08:00
Mikayla Maki df62cba2ef Tried alternate stratergy 2022-11-08 11:54:26 -08:00
Kay Simmons 04de300994 Addresses issue where left motion in vim mode would clip in the wrong direction 2022-11-04 15:21:29 -07:00
Kay Simmons 404f51643c fix some vim mode bugs around deletions and failed motions 2022-11-02 01:20:11 -07:00
K Simmons 8104b7aa77 fix jump to line number in vim mode 2022-10-25 00:39:40 -07:00
K Simmons b488a375c6 Fix panic in vim motion when not listed as exclusive and add features enum to capture why tests are ignored 2022-10-24 18:27:56 -07:00
Max Brunsfeld a2c9a67558 Re-export basic text types from text and language crates
Also avoid production dependencies on fs and rope in collab
2022-10-12 15:48:19 -07:00
Mikayla Maki fa862550fd Merge branch 'main' into test-branch 2022-10-11 19:55:32 -07:00
K Simmons 4d285aee6f Add count argument to motion functions and add ability to jump to a given line 2022-10-11 16:27:54 -07:00
Mikayla Maki a9ce687031 Finished refactoring out fs and rope 2022-10-11 15:25:54 -07:00
K Simmons 47def2b57d Add assertion context manager to TestAppContext and convert existing vim tests to use neovim backed test context 2022-10-10 14:46:07 -07:00
K Simmons 055a8fe14a Fixed some neovim test context issues, added repeated commands in vim mode, and ported some tests to use the neovim testing strategy 2022-10-08 21:52:07 -07:00
K Simmons bda6e5fdb7 Adds word and sentence text objects along with a new vim testing system which uses cached neovim data to verify our test accuracy 2022-10-08 21:51:49 -07:00
ForLoveOfCatsandMikayla fbea44bc5c One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Max Brunsfeld 8aef95d0c8 Use new marked ranges format whenever we don't need overlapping ranges 2022-08-04 10:23:03 -07:00
Max Brunsfeld a27d243309 Update vim mode tests to use new marked text format 2022-08-03 17:52:34 -07:00
Max Brunsfeld 75c349243c 🎨 Rename and simplify some autoindent stuff 2022-07-28 22:40:30 -07:00
Max Brunsfeld 7f991029b9 Merge branch 'main' into autoindent-on-paste 2022-07-28 15:09:18 -07:00
Max BrunsfeldandMikayla Maki 669d716519 Introduce AutoindentMode parameter to Buffer::edit
This controls whether or not we preserve the relative indentation
of inserted text blocks.

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2022-07-28 14:03:31 -07:00
Antonio Scandurra 2f99815f16 Fix vim tests using old key bindings 2022-07-27 12:19:01 +02:00
K Simmons 10f65f70d7 Fix clipping when dragging the mouse with vim-mode enabled and adjust single line editor selections 2022-07-19 17:18:17 -07:00
Keith Simmons 368cfcaf3c fix pasting at the end of the line in normal mode 2022-07-08 10:57:02 -07:00
Keith Simmons 590ab282a5 WIP making paste better 2022-07-05 16:52:56 -07:00
Keith Simmons 49d1b87d94 Fix vim editor focus selection issues, cancel vim operators on escape and unbound keys 2022-06-30 12:36:02 -07:00
Keith Simmons 2d611cb251 Fixup paste locations 2022-05-26 17:02:05 -07:00
Keith Simmons b0c5ac1f54 Unify visual line_mode and non line_mode operators 2022-05-26 17:02:05 -07:00
Keith Simmons 6bec27bd79 in progress working on aborting operators on unhandled editor input 2022-05-26 17:02:05 -07:00
Keith Simmons f053c479e9 Visual line mode handles soft wraps 2022-05-26 17:02:05 -07:00
Keith Simmons 36fa835664 Enable copy and paste in vim mode 2022-05-26 17:02:05 -07:00
Keith Simmons 9bb347b513 Review fixes 2022-05-13 15:55:27 -07:00
Keith Simmons 07ccf7c74b minor tweaks to selections collection api 2022-05-13 15:55:27 -07:00
Keith Simmons 851e04d46b Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections 2022-05-13 15:55:27 -07:00
Keith Simmons 9b46bb0ee6 Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection 2022-05-13 15:55:17 -07:00
Keith Simmons cdbad9aee4 Initial visual mode 2022-05-10 11:12:28 -07:00
Keith Simmons 660e3e9ef2 Add insert line above and below 2022-05-02 11:49:10 -07:00
Keith Simmons b011dbee8c WIP just missing insert line above and below 2022-05-02 11:49:10 -07:00
Keith Simmons 8e7fcb3b05 Add inclusive vs exclusive motions to vim mode 2022-04-21 16:50:23 -07:00
Keith Simmons 6196733e01 Handle linewise motions correctly and fix panic when executing invalid actions 2022-04-19 11:36:44 -07:00
Keith Simmons 6727a370c1 Revert d/c j and k binding special casing 2022-04-18 14:44:11 -07:00
Keith Simmons 35557b222c Add c and d operators to vim normal mode
Extracted motions from normal mode
Changed vim_submode to be vim_operator to enable better composition of operators
2022-04-15 16:05:50 -07:00
Max Brunsfeld 8bc0050578 Load all keybindings from JSON file 2022-04-10 14:29:45 -07:00
Max Brunsfeld 0908a8799c Allow actions to be deserialized from JSON
Introduce separate macro for implementing 'internal' actions which
are not intended to be loaded from keymaps.
2022-04-08 15:47:51 -07:00
0cf9925cb1 Restructure action macro to assign a namespace to every action
Also, allow arbitrary types to be used as Actions via the impl_actions macro

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:20:49 -07:00
Keith Simmons dda7cddc7c Add word and line movement in vim normal mode
Add jump to start and end of the document
Move vim tests to relevant vim files
Rename VimTestAppContext to VimTestContext for brevity
Improve VimTestContext assertions to pretty print locations when selection position assertion panics
2022-03-27 17:58:28 -07:00
Nathan Sobo 8a57598939 Fully disable vim mode on start unless it's enabled
Also: Make some structural adjustments to remove the need for defer. Instead of accessing the global in associated VimState functions, have a single method that allows us to call update instance methods.
2022-03-26 19:19:12 -06:00
Keith SimmonsandNathan Sobo 4e569432a2 Add clip_to_line_end to display_map/snapshot and set it to ensure vim positioning in normal mode
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:52 -07:00
Keith SimmonsandNathan Sobo 4a4982d518 Add initial vim mode mode switching
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:37 -07:00