Conrad Irwin
1295e5b41f
vim: Use explicit global, not default ( #2987 )
...
This should have no user-visible impact, but tidies up one of the
awkwardnesses
of how vim uses global state at the moment.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-09-19 20:52:25 -06:00
Conrad Irwin
71e519aa3b
vim: Use explicit global, not default
2023-09-18 14:22:41 -06:00
Conrad Irwin
417f28effe
Fix vim-related panic
2023-09-18 12:13:50 -06:00
Conrad Irwin
c2c521015a
Fix bug where cursors became invisible if replaying was interrupted
2023-09-11 20:56:22 -06:00
Conrad Irwin
20f98e4d17
vim . to replay
...
Co-Authored-By: maxbrunsfeld@gmail.com
2023-09-06 13:49:55 -06:00
Conrad Irwin
3ab3042e95
Don't show vim mode when disabled
2023-08-18 15:50:34 -06:00
Conrad Irwin
3514816ece
Store some vim state per-editor
...
This fixes a bug where opening and closing command would reset your
selection incorrectly.
2023-08-17 14:09:47 -06:00
Nathan Sobo
d896d89842
Store an AnyWindowHandle in WindowContext
2023-08-08 11:08:37 -06:00
Nathan Sobo
486f5bc6ca
Get compiling
2023-08-07 19:08:58 -06:00
Conrad Irwin
7337910034
Fix enter in search
2023-07-20 20:48:36 -06:00
Antonio Scandurra
912a4cf549
Avoid calling update_window
twice in blurred
event handler
...
This was preventing us from unhooking vim when performing a rename,
which prevented typing in the rename editor.
2023-05-04 16:18:01 +02:00
Max Brunsfeld
30f20024c0
Fix vim mode crash when active editor changes in inactive window
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-04-27 10:43:35 -07:00
Nathan Sobo
0bce80b6f8
Fix remaining vim failures
2023-04-20 15:25:11 -06:00
Antonio Scandurra
137d9384b5
Initialize the active editor when vim mode is enabled
...
Instead of waiting for a focus event. This makes more tests pass.
2023-04-20 14:02:40 -06:00
Antonio Scandurra
38ab6b123f
Make production code compile again
2023-04-17 12:33:33 +02:00
Nathan Sobo
de9bf6dfbd
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
3d53336916
More vim fixes and move some more things out of app.rs
2023-02-13 13:50:37 -08:00
Kay Simmons
c1812ddc27
fix issue with single line editors in vim not properly unhooking vim mode bindings
2023-02-13 13:50:37 -08:00
Kay Simmons
c3518cefe8
disable vim mode in non full editors
2023-01-17 17:32:10 -08:00
Kay Simmons
cffb064c16
Refactor editor scrolling and implement scroll commands from vim mode
2022-12-07 16:39:32 -08:00
Antonio Scandurra
7b009c8bbe
Merge branch 'main' into ime-support-2
2022-07-22 16:03:38 +02:00
Max Brunsfeld
2142fca673
Remove Input action, detect ignored input in vim via an event
2022-07-21 13:40:48 -07:00
K Simmons
1cfaac1bc5
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
66486870aa
Fix vim editor focus selection issues, cancel vim operators on escape and unbound keys
2022-06-30 12:36:02 -07:00
Keith Simmons
c9d23dba6c
Update command palette filter from vim mode more proactively
2022-06-29 11:58:12 -07:00
Max Brunsfeld
42cd2ae142
Avoid switching to visual mode when following in vim mode
...
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-05-26 17:02:05 -07:00
Keith Simmons
e93c49f4f0
Unify visual line_mode and non line_mode operators
2022-05-26 17:02:05 -07:00
Keith Simmons
f8f316cc64
Working change and delete in line mode
2022-05-26 17:02:05 -07:00
Keith Simmons
d7d17b2148
WIP line mode operations
2022-05-26 17:02:05 -07:00
Keith Simmons
797aecf7c1
Don't reset vim mode on editor focus
2022-05-02 11:49:10 -07:00
Keith Simmons
63278041e1
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
Keith Simmons
a7a52ef3f7
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
daf999c3be
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
1a29180185
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 Simmons
bb9b36dccd
Add initial vim mode mode switching
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:37 -07:00