vim: Document jk (#11150)

Release Notes:


- N/A
This commit is contained in:
Thorsten Ball
2024-04-29 07:27:35 +02:00
committed by GitHub
parent d4ec68b9ab
commit 8a79535b84
@@ -88,6 +88,19 @@ You can see the bindings that are enabled by default in vim mode [here](https://
The details of the context are a little out of scope for this doc, but suffice to say that `menu` is true when a menu is open (e.g. the completions menu), `VimWaiting` is true after you type `f` or `t` when we’re waiting for a new key (and you probably don’t want bindings to happen). Please reach out on [GitHub](https://github.com/zed-industries/zed) if you want help making a key bindings work. The details of the context are a little out of scope for this doc, but suffice to say that `menu` is true when a menu is open (e.g. the completions menu), `VimWaiting` is true after you type `f` or `t` when we’re waiting for a new key (and you probably don’t want bindings to happen). Please reach out on [GitHub](https://github.com/zed-industries/zed) if you want help making a key bindings work.
### Examples
Binding `jk` to exit insert mode and go to normal mode:
```
{
"context": "Editor && vim_mode == insert && !menu",
"bindings": {
"j k": ["vim::SwitchMode", "Normal"]
}
}
```
## Subword motion ## Subword motion
Subword motion is not enabled by default. To enable it, add these bindings to your keymap. Subword motion is not enabled by default. To enable it, add these bindings to your keymap.