Hello! Thank you for such an awesome plugin! Absolutely love it! 鉂わ笍
I've been trying to set up a few keymappings for insert mode. Most of them are not of a big importance, but this one is an absolute must for me and it doesn't work:
imap jj <Esc> :call VSCodeNotify('vscode-neovim.escape')<CR>
It doesn't even trigger the chord on the first j, like no reaction whatsoever.
Am I doing something wrong? Thanks!
Whoops, I just realized that insert mode is run completely by VSCode, so those kind of mappings probably won't work. I'll try to add the chords through vscode settings.
Alright, I figured it out. Adding the keymap to vscode's keybindings.json with neovim.mode == insert works great!
{
"key": "j j",
"command": "vscode-neovim.escape",
"when": "editorTextFocus && neovim.mode == insert"
}
It's probably a good idea to add a note on how to add key mappings for insert mode (with the above example). I'll send a PR tomorrow if you don't mind.
I tested my solution and it doesn't work very well. It works fine but all key combinations with the first chord get blocked like jk, jd, js etc. and you can't type them. It seems like this issue is more of VSCode problem, so I'm gonna close it for now.
Most helpful comment
Yes, something like
jjorjkfor the escape key won't work. And i have no plans to listen to events in insert mode unless this or this will be fixed. Sorry for inconvience!