Vim Feature: Noremap version of SendKeystrokes #34365
Closed
MarcusSanchez
started this conversation in
Ideas From Vim
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Send keystrokes is pretty much how we can mimic the scripting of lua or vimscript, and an essential feature in making bindings work as expected and without breaking other keys is through setting noremap.
Every key override in Zed's keymap.json with SendKeystrokes can actually break other SendKeystrokes.
For example here is a recursive SendKeystrokes that actually breaks itself:
"d d": ["workspace::SendKeystrokes", "\" _ d d"]
This is actually a useful binding as the user is wishing to have double-d not yank and instead send to the black hole register, however when executing this custom binding it breaks and recursively and perpetually gets stuck and does nothing.
A fix for this would to do a noremap version of SendKeystrokes that instead of using bindings in the user's custom keymaps, uses vim's default keymaps/bindings.
This would allow the example above to work as expected.
Beta Was this translation helpful? Give feedback.
All reactions