Release Notes:
- vim: Added `:diff` and `:revert` (that work with `'<,'>`) to open the
selected diff and revert it.
- vim: Added `d o` to open the diff and `d p` to revert (spiritually
similar to vim's do/dp, though obviously not the same)
- vim: Added `ctrl-p` and `ctrl-n` to summon the autocomplete menu in
insert mode.
Closes#16977
Release Notes:
- added current line as default sed range to match vim's behavior
- changed tests accordingly
This also simplifies `ReplaceCommand` implementation by changing
`Option<CommandRange>` to `CommandRange` .
Co-Authored-By: Mikayla <mikayla@zed.dev>
Co-Authored-By: Nate <nate@zed.dev>
Closes#15606Closes#13515
Release Notes:
- Fixes `-` being considered a word character for selections in some
languages
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Nate <nate@zed.dev>
This reverts commit 9206561662.
It lead to this panic:
```
Thread "main" panicked with "invalid SecondaryMap key used" at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:120:22
0: backtrace::backtrace::libunwind::trace
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/libunwind.rs:116:5
backtrace::backtrace::trace_unsynchronized::<<backtrace::capture::Backtrace>::create::{closure#0}>
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/mod.rs:66:5
1: backtrace::backtrace::trace::<<backtrace::capture::Backtrace>::create::{closure#0}>
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/backtrace/mod.rs:53:14
2: <backtrace::capture::Backtrace>::create
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/capture.rs:197:9
3: <backtrace::capture::Backtrace>::new
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.73/src/capture.rs:162:22
4: zed::reliability::init_panic_hook::{closure#0}
at /Users/thorstenball/work/zed/crates/zed/src/reliability.rs:58:29
5: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2077:9
std::panicking::rust_panic_with_hook
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:799:13
6: std::panicking::begin_panic::<&str>::{closure#0}
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:694:9
7: std::sys_common::backtrace::__rust_end_short_backtrace::<std::panicking::begin_panic<&str>::{closure#0}, !>
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:171:18
8: std::panicking::begin_panic::<&str>
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:693:12
9: <slotmap::secondary::SecondaryMap<gpui::app::entity_map::EntityId, alloc::boxed::Box<dyn core::any::Any>> as core::ops::index::Index<gpui::app::entity_map::EntityId>>::index
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slotmap-1.0.7/src/secondary.rs:866:21
10: <gpui::app::entity_map::EntityMap>::read::<vim::Vim>
at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:120:22
11: <gpui::app::entity_map::Model<vim::Vim>>::read
at /Users/thorstenball/work/zed/crates/gpui/src/app/entity_map.rs:397:9
12: <gpui::view::View<vim::Vim>>::read
at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:81:9
13: <vim::VimAddon as editor::Addon>::should_show_inline_completions
at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:138:20
14: <editor::Editor>::should_show_inline_completions
at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:2347:21
15: <editor::Editor>::refresh_inline_completion
at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:4988:17
16: <editor::Editor>::undo
at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:6868:13
17: vim::normal::register::{closure#7}::{closure#0}
at /Users/thorstenball/work/zed/crates/vim/src/normal.rs:176:17
18: <vim::Vim>::update_editor::<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}
at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:693:45
19: <gpui:🪟:WindowContext as gpui::VisualContext>::update_view::<editor::Editor, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3890:22
20: <gpui:🪟:ViewContext<vim::Vim> as gpui::VisualContext>::update_view::<editor::Editor, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4522:9
21: <gpui::view::View<editor::Editor>>::update::<gpui:🪟:ViewContext<vim::Vim>, (), <vim::Vim>::update_editor<(), vim::normal::register::{closure#7}::{closure#0}>::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:76:9
22: <vim::Vim>::update_editor::<(), vim::normal::register::{closure#7}::{closure#0}>
at /Users/thorstenball/work/zed/crates/vim/src/vim.rs:693:14
23: vim::normal::register::{closure#7}
at /Users/thorstenball/work/zed/crates/vim/src/normal.rs:174:9
24: <gpui:🪟:ViewContext<vim::Vim>>::listener::<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4444:40
25: <gpui:🪟:WindowContext as gpui::VisualContext>::update_view::<vim::Vim, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3890:22
26: <gpui::view::View<vim::Vim>>::update::<gpui:🪟:WindowContext, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:76:9
27: <gpui::view::WeakView<vim::Vim>>::update::<gpui:🪟:WindowContext, (), <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/view.rs:192:12
28: <gpui:🪟:ViewContext<vim::Vim>>::listener::<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4444:13
29: <editor::Editor>::register_action::<vim::normal::Undo, <gpui:🪟:ViewContext<vim::Vim>>::listener<vim::normal::Undo, vim::normal::register::{closure#7}>::{closure#0}>::{closure#0}::{closure#0}
at /Users/thorstenball/work/zed/crates/editor/src/editor.rs:12053:25
30: <gpui:🪟:WindowContext>::dispatch_action_on_node
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3514:21
31: <gpui:🪟:WindowContext>::dispatch_key_event
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3303:13
32: <gpui:🪟:WindowContext>::dispatch_event
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:3131:13
33: <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:776:46
34: <gpui::app::AppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>::{closure#0}
at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:1396:26
35: <gpui::app::AppContext>::update::<core::result::Result<gpui:🪟:DispatchEventResult, anyhow::Error>, <gpui::app::AppContext as gpui::Context>::update_window<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:362:22
36: <gpui::app::AppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:1387:9
37: <gpui::app::async_context::AsyncAppContext as gpui::Context>::update_window::<gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/app/async_context.rs:91:9
38: <gpui:🪟:AnyWindowHandle>::update::<gpui::app::async_context::AsyncAppContext, gpui:🪟:DispatchEventResult, <gpui:🪟:Window>:🆕:{closure#10}::{closure#0}>
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:4750:9
39: <gpui:🪟:Window>:🆕:{closure#10}
at /Users/thorstenball/work/zed/crates/gpui/src/window.rs:775:17
40: <alloc::boxed::Box<dyn core::ops::function::FnMut<(gpui::interactive::PlatformInput,), Output = gpui:🪟:DispatchEventResult>> as core::ops::function::FnMut<(gpui::interactive::PlatformInput,)>>::call_mut
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/boxed.rs:2070:9
41: gpui::platform::mac:🪟:handle_key_event
at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/window.rs:1300:32
42: gpui::platform::mac:🪟:handle_key_down
at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/window.rs:1212:5
43: <unknown>
44: <unknown>
45: <unknown>
46: <unknown>
47: <unknown>
48: <() as objc::message::MessageArguments>::invoke::<()>
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/mod.rs:128:17
49: objc::message::platform::send_unverified::<objc::runtime::Object, (), ()>
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/apple/mod.rs:27:9
50: objc::message::send_message::<objc::runtime::Object, (), ()>
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc-0.2.7/src/message/mod.rs:178:5
<*mut objc::runtime::Object as cocoa::appkit::NSApplication>::run
at /Users/thorstenball/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocoa-0.26.0/src/appkit.rs:628:9
51: <gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run
at /Users/thorstenball/work/zed/crates/gpui/src/platform/mac/platform.rs:427:13
52: <gpui::app::App>::run::<zed::main::{closure#3}>
at /Users/thorstenball/work/zed/crates/gpui/src/app.rs:159:9
53: zed::main
at /Users/thorstenball/work/zed/crates/zed/src/main.rs:439:5
54: <fn() as core::ops::function::FnOnce<()>>::call_once
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:250:5
55: std::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/sys_common/backtrace.rs:155:18
56: std::rt::lang_start::<()>::{closure#0}
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:159:18
57: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/ops/function.rs:284:13
std::panicking::try::do_call
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
std::panicking::try
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
std::panic::catch_unwind
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
std::rt::lang_start_internal::{{closure}}
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:141:48
std::panicking::try::do_call
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:559:40
std::panicking::try
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panicking.rs:523:19
std::panic::catch_unwind
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/panic.rs:149:14
std::rt::lang_start_internal
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:141:20
58: std::rt::lang_start::<()>
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/std/src/rt.rs:158:17
59: _main
```
Release Notes:
- N/A
This fixes an annoying bug I ran into, where supermaven completions
would show up in normal mode.
cc @ConradIrwin not sure if this is the best way to fix this, but it
seems like the neatest? On one hand, I didn't want to touch into Vim
from the editor, and on the other I didn't want to add another boolean
on the editor that flips on when in normal mode. So instead I extended
the Addon interface.
Release Notes:
- Fixed inline completions (Copilot or Supermaven) showing up in Vim's
normal mode.
when the focused_vim is deactivate, focused_vim should set none.
fix the problem that opening the first buffer from EmptyPane will not
toggle,The reason is the edge case where focused_vim is none when
opening for the first time.
Release Notes:
- N/A
Before, when using `?` and `#` for backwards search it would initially
search for the previous match, but upon subsequent inputs to `n` and
`N`, `n` is always treated as "forward" and `N` is always treated as
"backward", instead of continuing the search direction.
now, if i use `?` or `#` for backward search, `n` will go to the
previous selection, and `N` will go to the next. Functionality stays the
same for `/` and `*`.
Release Notes:
- vim: Fixed `n` direction after searching backwards
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This adds an option to set the split direction for both the horizontal
splits, and the vertical splits.
A couple of things to look for when reviewing:
* The `derive` keywords on the Enums were copy pasted, no clue what they
should be
* Tried adding tests for this, but got stuck.
Co-authored with @Tobbe
Fixes: https://github.com/zed-industries/zed/issues/11342
Release Notes:
- vim: Added `gf` command to open files under the cursor.
- Filenames can now be `cmd`/`ctrl`-clicked, which opens them.
TODOs:
- [x] `main_test.go` <-- works
- [x] `./my-pkg/my_pkg.go` <-- works
- [x] `../go.mod` <-- works
- [x] `my-pkg/my_pkg.go` <-- works
- [x] `my-pkg/subpkg/subpkg_test.go` <-- works
- [x] `file\ with\ space\ in\ it.txt` <-- works
- [x] `"file\ with\ space\ in\ it.txt"` <-- works
- [x] `"main_test.go"` <-- works
- [x] `/Users/thorstenball/.vimrc` <-- works, but only locally
- [x] `~/.vimrc` <--works, but only locally
- [x] Get it working over collab
- [x] Get hover links working
Demo:
https://github.com/user-attachments/assets/26af7f3b-c392-4aaf-849a-95d6c3b00067
Collab demo:
https://github.com/user-attachments/assets/272598bd-0e82-4556-8f9c-ba53d3a95682
Closes#13579
A major painpoint in the Vim crate has been life-cycle management. We
used to have one global Vim instance that tried to track per-editor
state; this led to a number of subtle issues (e.g. #13579, the mode
indicator being global, and quick toggling between windows letting vim
mode's notion of the active editor get out of sync).
This PR changes the internal structure of the code so that there is now
one `Vim` instance per `Editor` (stored as an `Addon`); and the global
stuff is separated out. This fixes the above problems, and tidies up a
bunch of the mess in the codebase.
Release Notes:
* vim: Fixed accidental visual mode in project search and go to
references
([#13579](https://github.com/zed-industries/zed/issues/13579)).
Closes#15860
Since rust std now supports LazyLock replacing lazy_static with it
reduce the external dependency.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
For future reference: WIP branch of copy/pasting a mixture of images and
text: https://github.com/zed-industries/zed/tree/copy-paste-images -
we'll come back to that one after landing this one.
Release Notes:
- You can now paste images into the Assistant Panel to include them as
context. Currently works only on Mac, and with Anthropic models. Future
support is planned for more models, operating systems, and image
clipboard operations.
---------
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Jason <jason@zed.dev>
Co-authored-by: Kyle <kylek@zed.dev>
This makes sure that the `vertical_scroll_margin` doesn't leave the
cursor out of screen or somewhere it shouldn't go when it's higher than
the visible lines on screen.
So we cap it to `visible_line_count / 2`, similar to nvim:
5aa1a9532c/src/nvim/window.c (L6560)Fixes#15101
Release Notes:
- Fixed `ctrl-u`/`ctrl-d` in Vim mode not working correctly when
`vertical_scroll_margin` is set to a really high value.
Co-authored-by: Bennet <bennet@zed.dev>
When setting `"vertical_scroll_margin": 99` or other high values this
can lead to a panic that crashes Zed.
Release Notes:
- vim: Fixed a possible panic that could happen when using a very high
value for `vertical_scroll_margin` that exceeded the number of visible
lines on the screen.
Co-authored-by: Bennet <bennet@zed.dev>
Vim digraphs are a way to insert special characters using sequences of
two ASCII characters. I've implemented the feature using a new `Digraph`
operator, following the example of `AddSurrounds`. There are still a few
issues that I'm not sure what the best way to resolve them is.
- To insert `ş`, the user must pause between pressing `ctrl-k` and `s
,`, otherwise it triggers the binding for `ctrl-k s`. Is there a way to
disable `ctrl-k *` bindings while in insert, replace or waiting mode?
- Is there a better way to insert a string at all of the cursors? At the
moment I'm constructing the edits manually.
- The table of default digraphs is a 1.4k line rust expression. Is this
okay as long as it's in its own module?
- I'd like a second opinion on how best to structure the settings.json
entry.
- I have omitted the "meta character" feature as I don't think it makes
sense when editing UTF-8 text.
Release Notes:
- Added support for Vim digraphs.
Resolves#11871
Still TODO:
* [x] hide this UI unless you have some ssh projects in settings
* [x] add the "open folder" flow with the new open picker
* [ ] integrate with recent projects / workspace restoration
Release Notes:
- N/A
Minor bug where the command count overflows when enough digits are
entered. This swaps out simple multiplication/addition for their checked
counter parts, falling back to the previous value in case of overflow.
Release Notes:
- N/A
<img width="624" alt="image"
src="https://github.com/user-attachments/assets/f492b0bd-14c3-49e2-b2ff-dc78e52b0815">
- [x] Correctly set custom model token count
- [x] How to count tokens for Gemini models?
- [x] Feature flag zed.dev provider
- [x] Figure out how to configure custom models
- [ ] Update docs
Release Notes:
- Added support for quickly switching between multiple language model
providers in the assistant panel
---------
Co-authored-by: Antonio <antonio@zed.dev>
### Summary
This PR adds support for count and object motions to the toggle comments
action in Vim mode. The relevant issue is
[#14337](https://github.com/zed-industries/zed/issues/14337).
For example, `2 g c j` will toggle comments three lines downward. `g c g
g` will toggle comments from the current cursor position up to the start
of the file.
Notably missing from this PR are `g c b` (toggle comments for the
current block) as well as `g c p` (toggle comments for the current
paragraph). These seem to be non-standard.
The new module `normal/toggle_comments.rs` has been copied almost
verbatim from `normal/indent.rs`. Maybe that ought to be abstracted over
but I feel I lack the overview.
Release Notes:
- vim: Added support for count and object motion to the toggle comments
action ([#14337](https://github.com/zed-industries/zed/issues/14337)).
Simplify key dispatch code.
Previously we would maintain a cache of key matchers for each context
that
would store the pending input. For the last while we've also stored the
typed prefix on the window. This is redundant, we only need one copy, so
now
it's just stored on the window, which lets us avoid the boilerplate of
keeping
all the matchers in sync.
This stops us from losing multikey bindings when the context on a node
changes
(#11009) (though we still interrupt multikey bindings if the focus
changes).
While in the code, I fixed up a few other things with multi-key bindings
that
were causing problems:
Previously we assumed that all multi-key bindings took precedence over
any
single-key binding, now this is done such that if a user binds a
single-key
binding, it will take precedence over all system-defined multi-key
bindings
(irrespective of the depth in the context tree). This was a common cause
of
confusion for new users trying to bind to `cmd-k` or `ctrl-w` in vim
mode
(#13543).
Previously after a pending multi-key keystroke failed to match, we would
drop
the prefix if it was an input event. Now we correctly replay it
(#14725).
Release Notes:
- Fixed multi-key shortcuts not working across completion menu changes
([#11009](https://github.com/zed-industries/zed/issues/11009))
- Fixed multi-key shortcuts discarding earlier input
([#14445](https://github.com/zed-industries/zed/pull/14445))
- vim: Fixed `jk` binding preventing you from repeating `j`
([#14725](https://github.com/zed-industries/zed/issues/14725))
- vim: Fixed `escape` in normal mode to also clear the selected
register.
- Fixed key maps so user-defined mappings take precedence over builtin
multi-key mappings
([#13543](https://github.com/zed-industries/zed/issues/13543))
- Fixed a bug where overridden shortcuts would still show in the Command
Palette
Fix: #14242
At present, we don't trigger the method `start_recording(cx)` to start
recording when typing add_surround, so it can't be repeated well, delete
and change actually don't increase, but when entering `d` and `c`, it
happens that these two operations are recorded, I think maybe we also
need to call `start_recording(cx)` when calling delete_surround and
change_surround, otherwise when the user modifies their shortcuts, these
two functions may not be supported by repeat
Release Notes:
- N/A
At present, when calculating some ranges, we take the `tuple_windows` to
iterate forward, which will cause some problems when the cursor is being
front, because `tuple_windows` iteration cannot iterate to the very
beginning, so there will be some cases that cannot be calculated, adjust
this method, and now it can calculate more perfectly, and the execution
speed is about the same
Release Notes:
- N/A
Release Notes:
- vim: Added `-`/`+` to go to beginning of line above/below
([#14183](https://github.com/zed-industries/zed/issues/14183)).
- vim: (Breaking) Removed non-standard builtin binding from `-` to open
the project panel. You can re-add it to your keymap file with:
`{"context":"VimControl", "bindings":{ "-":
"pane::RevealInProjectPanel"}}`
Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.
https://github.com/zed-industries/zed/assets/32429059/0e9e9348-265e-4a81-a45a-4739034dc5d9
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Release Notes:
- vim: (BREAKING) Improved vim keymap contexts.
Previously `vim_mode == normal` was true even when operators were
pending, which led to bugs like #13789 and a requirement for custom
keymaps to exclude various conditions like (`!VimObject` and
`!VimWaiting`) to avoid bugs.
Now `vim_mode` will be set to `operator` or `waiting` in these cases as
described in [the docs](https://zed.dev/docs/vim#keybindings). For most
custom keymaps this change will be a no-op or an improvement, but if you
were deliberately relying on the old behaviour (if you were relying on
`VimObject` or `VimWaiting` becoming true) you will need to update your
keymap.
---------
Co-authored-by: Thorsten <thorsten@zed.dev>