Vim keymap: map function under the 'visual' context.

Hello!

First, thanks to this community and Marijn for CodeMirror, I really like it (Tern is also a really good piece).

I was yesterday implementing the evil escape (you press two chars and you exit from the input mode), trying to contribute to this software, and I was just with the tests when I just found one that was close to what I wanted to test: ex_imap. Agggg, all my work lost, because it is currently implemented (before starting I just was searching for escape/“fd”/evil, etc. Next time I will need more studying and discovering time).

So, now I just use the editor like this:

      CodeMirror.Vim.map('jk', '<Esc>', 'insert');

But when I tried to use also for ‘visual’ mode:

      CodeMirror.Vim.map('jk', '<Esc>', 'visual');

It does not work.

So, my question is if it is supported this type of mapping for visual mode. I just was searching in handleKeyNonInsertMode but it does not return a partial match, but always full (while in the first case, under insert, it recognizes the partial). j is currently a keybinding (full). Also, I don’t find other window.setTimeout like in handleKeyInsertMode to test if insertModeEscKeysTimeout ms later the combination was pressed. So, I suspect that it does not work.

Thanks!