The VSCodeVim team prioritizes issues based on reaction count.
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Environment:
What happened:
I have the key sequence jk mapped to escape in insert mode, but this causes multiple inserts to only insert once when I exit insert mode using jk. For example, the key sequence 3i=jk on an empty document produces only:
=
What did you expect to happen:
In vim, and using the plain old escape key, 3i=<Esc> on an empty document produces:
===
How to reproduce it:
Bind jk to <Esc> in insert mode:
"vim.insertModeKeyBindings": [
{
"before": ["j", "k"],
"after": ["<Esc>"]
}
],
I've dug around in the source code a bit and it seems like this is happening because only <Esc>, rather than i=<Esc>, is being handled count times in the Remapper.sendKey() method in src/configuration/remapper.ts (looks like there's a pending pull request to refactor that file, so this might change). I'd love to help out with this, but I'm not sure of the scale of the refactoring that would be needed to do this (also can't figure out how to implement tests for the extension's handling of keybindings - I can't find any examples of that). I'll keep looking into this, but in the meantime, any advice would be appreciated. Thanks for all your work on a great extension!
Any news about this bug?
@J-Fields I can try to handle this one.
Most helpful comment
@J-Fields I can try to handle this one.