BUG REPORT:
What happened:
when using jj as
What did you expect to happen: keep file unmodified
How to reproduce it (as minimally and precisely as possible):
Remap jj
open file
go to insert mode, press jj
file not changed but vscode says it's modified
:+1:
Not entirely sure how we could solve this. The extension will temporarily insert the jj to the text document and then when it figures out it's a remapping, delete the jj and instead use an <Esc>. However, since we did actually modify the file, VSCode marks it as dirty.
There's no way as an extension to tell VSCode to state this file isn't actually dirty, and I doubt that they would ever expose such a thing.
Same root cause as https://github.com/VSCodeVim/Vim/issues/565. Let's use that issue instead to track.
nope, my solution below isn't working correctly.
obsolete solution
my current way to solve this is to set `jk` to:
"vim.insertModeKeyBindings": [
{
"before": ["j", "k"],
"after": ["<Esc>", "u", "u"]
}
],
while `u` stands for `undo`:
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["u"],
"after": [],
"commands": [
{
"command": "undo",
"args": []
}
]
}
]
hope this helps
this also deletes everything that you typed before pressing jk
yes, just realized it after I used it for a while. sorry
this also deletes everything that you typed before pressing jk