Open lefp opened 1 month ago
Esc has a binding just like any other key that you can bind to other keys: https://github.com/helix-editor/helix/blob/22a051408a467ff8b3e43457961d5497903dc7d0/helix-term/src/keymap/default.rs#L183
(I also recommend remapping esc to a better place on the keyboard)
Esc has a binding just like any other key that you can bind to other keys:
If you're suggesting this:
[keys.normal.Z]
C-l = "normal_mode"
I've already tried it (latest master, 22a051408a467ff8b3e43457961d5497903dc7d0), and pressing the keybind in sticky view mode doesn't do anything. Does it work on your machine?
After messing around a little more, it looks like running any mode-switching command from Sticky View causes it to switch to that mode, but also does not exit Sticky View.
Here, for example, I enter insert_mode
from Sticky View. Instead of leaving Sticky View, it allows me to insert any characters that are not bound to a Sticky View key.
https://asciinema.org/a/wBztUNYfjZf8kc14jz25QB0nq
Yeah sticky is only able to be cleared currently by escape: https://github.com/helix-editor/helix/blob/22a051408a467ff8b3e43457961d5497903dc7d0/helix-term/src/keymap.rs#L323-L329
As far as I can tell, there is no way to exit sticky view mode (Z) except by pressing Esc. I don't like reaching over to hit Esc.
The ability to configure a keybind for this would solve this problem. E.g. via a dedicated command: