vim: subword motions (#8725)
Add subword motions to vim, inspired by [nvim-spider](https://github.com/chrisgrieser/nvim-spider), [CamelCaseMotion](https://github.com/bkad/CamelCaseMotion). Release Notes: - Added subword motions to vim
This commit is contained in:
parent
467a179837
commit
d247086b21
6 changed files with 491 additions and 93 deletions
|
@ -88,6 +88,22 @@ 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.
|
||||
|
||||
## Subword motion
|
||||
|
||||
Subword motion is not enabled by default. To enable it, add these bindings to your keymap.
|
||||
|
||||
```json
|
||||
{
|
||||
"context": "Editor && VimControl && !VimWaiting && !menu",
|
||||
"bindings": {
|
||||
"w": "vim::NextSubwordStart",
|
||||
"b": "vim::PreviousSubwordStart",
|
||||
"e": "vim::NextSubwordEnd",
|
||||
"g e": "vim::PreviousSubwordEnd"
|
||||
}
|
||||
},
|
||||
```
|
||||
|
||||
## Command palette
|
||||
|
||||
Vim mode allows you to enable Zed’s command palette with `:`. This means that you can use vim's command palette to run any action that Zed supports.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue