philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.53k stars 2.49k forks source link

allow `unmap <Escape>` #3203

Open xxyxxyxyx1 opened 5 years ago

xxyxxyxyx1 commented 5 years ago

Since #2305, it is possible to map <c-c> exitMode, so one does not have to use <Escape> to exit insert mode. Now, could we regain native functionality by unmap <Escape>?

I use <Escape> very often for its native behavior in many websites, so something like <c-]><Escape> is not an acceptable option.

Thanks

prendradjaja commented 5 years ago

My solution has some obvious limitations and might not be something you want to use, but in case it's helpful:

I currently use Vimium with site-specific overrides, allowing esc to pass through for some specific elements on some specific sites. Like you, I'd rather not have to use something like <c-]><esc> -- this allows me to press esc and have it "just work"...

https://github.com/prendradjaja/vimium

rightaway commented 3 years ago

Is there any workaround for this to restore native Escape functionality?

gdh1995 commented 3 years ago

The command "passNextKey" might help.

---Original--- From: @.> Date: Wed, May 5, 2021 21:37 PM To: @.>; Cc: @.***>; Subject: Re: [philc/vimium] allow unmap <Escape&gt; (#3203)

Is there any workaround for this to restore native Escape functionality?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rightaway commented 3 years ago

@gdh1995 I mean a workaround that lets us use Escape natively, rather than having to enter the passNextKey command every time. The only workaround I've found is to disable vimium entirely on the sites where I need Escape, which is really not good because then some sites don't respond to vimium shortcuts and some do.

Is there any reason that Escape can't be unmapped while other keys can? I think it's an important feature to allow. That in combination with exitMode would be an ideal solution.

gdh1995 commented 3 years ago

Neither esc, nor F1~F12, left/right/up/down can be excluded in Vimium, because it treats every character in pass keys as a independent key, so no long keys can match those characters.

I have a customized version of Vimium, named Vimium C, and it treats pass keys as a list of composed keys (split by space characters), so <esc> j <c-k> will exclude Escape, J and Ctrl+K.

johannesjo commented 3 years ago

I am also unable to unmap the # key.