whame / tmux-modal

Execute complex tmux commands in just a few keystrokes with a modal mode that is designed to be efficient, easy to remember and comfortable
MIT License
172 stars 4 forks source link

Allow getting out of "modal mode" by pressing `ESC` #3

Closed farzadmf closed 2 years ago

farzadmf commented 2 years ago

Currently, the only. way to get out of "modal mode" is the press M-m again. It would be nice to also allow ESC to achieve the same thing

whame commented 2 years ago

So we could maybe add an extra configurable "exit" keybinding, i.e. M-m behaves as usual enter/exit but one extra key can be set to also exit (e.g. ESC, i or whatever).

I'll work on this soon. Please stand-by!

whame commented 2 years ago

Please upgrade to latest version and try it out! In short, we now have KBD_CMD_EXIT in the configuration that is set to M-m by default and can be overridden by the user to any other key. Thus, in your case set it to

KBD_CMD_EXIT=Escape
farzadmf commented 2 years ago

Nice! Could it be somehow "appending" the key? Basically, allow exiting out by pressing either ESC or M-m?

whame commented 2 years ago

I believe it should be consistent, i.e. one keybinding does one thing. If we have several ways of doing the same thing, it would get confusing (e.g. "do I need to override two variables for the same thing?"). It's easier to learn one thing and stick to it :)

farzadmf commented 2 years ago

Sure, of course whatever I say is only suggestion, you're the one making the final decision 🙂

And I guess we can close this now?