Add this to config:
"vim.insertModeKeyBindings": [
{
"before": [
"d",
"f"
],
"after": [
"<Esc>"
]
}
]
to work keys same as in vim and same as
put cursor in the middle of text and press df, it enters normal mode, but places cursor one position further than
this helps
"vim.insertModeKeyBindings": [
{
"before": [
"d",
"f"
],
"after": [
"<Esc>",
"h"
]
}
]
Ah good catch!
Just to clarify what I see to reproduce this, remapped keys to esc (I use jj) do not leave the cursor in the same place as just esc when leaving insert mode. It is supposed to be 1 char backward from where it is
This must be because I reverse the keystrokes but don't reverse the cursor position.
I think the correct way to do this would be to record where the cursor was when you started to type jj, then put it back there once we've erased jj in the remapper.
found out that my hack working bad if you are at the end of the line
so is there any workaround for this? I'm trying to start using vscode instead of vim again and stuck with this same bug
Most helpful comment
This must be because I reverse the keystrokes but don't reverse the cursor position.
I think the correct way to do this would be to record where the cursor was when you started to type jj, then put it back there once we've erased jj in the remapper.