Adding Surround to visual mode selection #24677
Replies: 3 comments
-
After trial and error, I think I figured this out. It should be
The docs has to be updated. |
Beta Was this translation helpful? Give feedback.
-
I believe we're in the midst of that command changing so some docs and releases aren't quite in sync. This is the "old" way that is currently in Zed Stable... "shift-s": ["vim::PushOperator", { "AddSurrounds": {} }] However, in Zed Preview this has changed to... "shift-s": ["vim::PushAddSurrounds", {}] The documentation appears to be just ahead of the stable release. I think this will work itself out next time there's a stable release. Additionally, when you do hit that point, you'll get a popup asking if you'd like Zed to auto-migrate your keymap to the new keybindings. I know that at least Looks like you've got it sorted, but leaving this for posterity. P.S. Since I'm trying to summarize here I also noticed that the auto-migration changes task names from "My Task Name" to "my_task_name" which broke all my tasks until I figured out what happened ha |
Beta Was this translation helpful? Give feedback.
-
Any advice on one one gets PushChangeSurrounds or PushDeleteSurrounds to work? Both do nothing for me, even when I call it from the command search popup. Unsure about what the selection needs to be too, but I tried basically everything already. edit: And just when I finished writing this I tried: PushChangesurrounds - r (replace) - new character, and that worked, nice. I do wonder why r is necessary though, seems redundant? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to surround the visual selection with
S (shift-s)
which is the default behaviour of vim-surround/VSCodeVim. I tried addingbased on the docs here - https://zed.dev/docs/vim
But, it is just erroring out ... Any help on this is appreciated!


Beta Was this translation helpful? Give feedback.
All reactions