From f2cc24c5faa8b104334ba7a42d0db92175b0b51e Mon Sep 17 00:00:00 2001 From: Will Garrison Date: Sun, 14 Dec 2025 07:20:33 +0000 Subject: [PATCH] docs: Add clarifying note about Vim subword motion (#44535) Clarify the docs regarding how operators are affected when subword motion in Vim is activated. Ref: https://github.com/zed-industries/zed/issues/23344#issuecomment-3186025873. Release Notes: - N/A --------- Co-authored-by: Kunall Banerjee --- docs/src/vim.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/src/vim.md b/docs/src/vim.md index 9ba1b059223f147d73398a1ec91e6d818ff92c8a..09baa9b54f7e1aeb5f16777f4292131315d18928 100644 --- a/docs/src/vim.md +++ b/docs/src/vim.md @@ -471,7 +471,7 @@ But you cannot use the same shortcuts to move between all the editor docks (the } ``` -Subword motion, which allows you to navigate and select individual words in camelCase or snake_case, is not enabled by default. To enable it, add these bindings to your keymap. +Subword motion, which allows you to navigate and select individual words in `camelCase` or `snake_case`, is not enabled by default. To enable it, add these bindings to your keymap. ```json [settings] { @@ -485,6 +485,9 @@ Subword motion, which allows you to navigate and select individual words in came } ``` +> Note: Operations like `dw` remain unaffected. If you would like operations to +> also use subword motion, remove `vim_mode != operator` from the `context`. + Vim mode comes with shortcuts to surround the selection in normal mode (`ys`), but it doesn't have a shortcut to add surrounds in visual mode. By default, `shift-s` substitutes the selection (erases the text and enters insert mode). To use `shift-s` to add surrounds in visual mode, you can add the following object to your keymap. ```json [settings]