Emulation of repeatable/sticky commands #41759
eugenesvk
started this conversation in
Show and tell
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.
-
If you use the more convenient key sequences instead of holding modifiers, e.g.,
(🡙 means tapping a key)
file_finder::Toggleworkspace::Openworkspace::OpenFilesInstead of:
you might encounter "repeatable" commands like scroll or pane resize which you'd like to execute multiple times in a row, e.g., until the pane reaches the size you want. But repeating the preceding key sequence is not great.
You can use this trick to create custom repeatable commands that in the end repeat their own prefix keybinds (except for the last key), though unfortuntely, they only work within 1 second of the last invocation as then Zed resets the wait for the next key in a sequence.
For example, you can use ◀▶ to resize current pane left/right with and ⎇ prefix tap
You can even use plain alphakeys even in insert mode: for example, using the , prefix to scroll up/down with home row j/k since it's rare to not insert space after a comma in regular text:
alt-F24should be a combo you'll never use on its own, just needed to "redirect" execution to a non-typable key otherwise,doesn't get cleaned up by Zed since we send it again and don't complete the combo at the very end.Beta Was this translation helpful? Give feedback.
All reactions