Commit Graph
21 Commits
Author SHA1 Message Date
Conrad Irwin 488b325f60 Fix 0 used in a count 2023-09-12 09:56:23 -06:00
Conrad Irwin b850e0b8a6 vim: ALlow counts on insert actions
This re-uses the existing repeat infrastructure.
2023-09-11 18:09:47 -06:00
Conrad Irwinand 204e716a5d vim . to replay
Co-Authored-By: maxbrunsfeld@gmail.com
2023-09-06 13:49:55 -06:00
Nathan Sobo d937660683 Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06: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
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 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
Max Brunsfeld a27d243309 Update vim mode tests to use new marked text format 2022-08-03 17:52:34 -07: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 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 8e7fcb3b05 Add inclusive vs exclusive motions to vim mode 2022-04-21 16:50:23 -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
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 Simmons 19c4e3cbff Fixed issue with enabling and disabling vim mode dynamically
Also added indoc and marked text utility to vim tests to improve readability
2022-03-25 20:10:52 -07: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