-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow any key to mapped to "exit mode" instead of just <esc> #301
Comments
Yeah, we should have a command equivalent to escape - that would be useful. |
Agreed. |
You can also use |
I'd also find this feature to be useful. I've read that the ESC key on keyboards when vi was first written was closer to where the q is now instead of up in the corner. This makes sense, since reaching all the way up to the corner so frequently is not all that convenient. |
Any news on this issue? Is it too difficult to implement? For me it's an inconsistency between vim and vimium since vim is mapped to jj for me as well. |
It's not too difficult. It's a great starter bug if someone would like to try their hand at this enhancement. |
Do we want to implement this only for normal mode, or for all modes (like input and find)? If it's the latter, it's not going to be that simple. |
To be consistent any remap of should apply to all modes. Why would it be particularly difficult, apart from ensuring the code paths for each mode reference the same "exitKey" var? |
Right now the code that allows configurable matching of keys to commands lives in the background page, and only handles normal-mode keypresses. Remapping keys is essentially done by changing our key-to-command 'routing table'. On the other hand, quitting in find or insert modes relies on a special-case code path in the content script ( I'm in favor of the latter as I think it is more elegant to use the same configurable key mapping logic for all modes. Moreover, this opens up the possibility for emulating Vim's |
Good stuff. Thanks for the writeup. Maybe this isn't low-hanging-fruit for a first-timer =) I don't have a strong preference, but the first proposal does sound easier to implement. |
I would to see this in addition to Vim's |
I have tried to implement this in PR #1140. Due to the nature of input mode, it only accepts single keys bound to |
+1 |
+1 |
👎 |
Hi @smblott-github, just curious why this was labeled |
Reopening and removing wont-fix label. This is indeed a feature that is requested a lot. It was closed as part of a cull of long-standing open issues. |
Folks, see #2253. |
Thanks a lot, your efforts are appreciated! |
Closing, see this comment. |
I have jj remapped to in vim since its easier to type. Would it be possible to make a remapping such as this work to leave insert mode?
Thanks
The text was updated successfully, but these errors were encountered: