philc/vimium

[Firefox] Vimium breaks Vim-mode in CodeMirror

Opened this issue · 3 comments

CodeMirror provides a Vim-mode. However, if Vimium is installed, I cannot come back to normal mode once I enter insert mode in the codemirror editing box.

We handle esc, and so the CodeMirror input never gets it. To workaround this, you'll want to map some key to passNextKey (in the options page), and then you can press that before esc to pass it.

Edit: this advice doesn't work, since we're in insert mode.

In current master (due to commit 66b11f9), if you add map <c-[> passNextKey to your mappings, then we won't handle ctrl+[ and the CodeMirror input will interpret it as esc. There isn't any workaround for the versions in the Chrome/Firefox stores that I can see.

@smblott-github I like the sound of something like Vimperator's <c-esc> that toggles all Vimium keys (noted in the CodeMirror issues). What do you think?

(Edit: trial version implemented on this branch. [Diff])

jez commented

I've opened a pull request that special-cases CodeMirror into Vimium so that the two can co-exist peacefully: #2993.

I've been using it locally for a while, and it seems to fit my needs; feel free to try it out.