Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
What happened:
The action of the u command cannot be redo-ed by 鈬р寴Z(which is the redo key of vscode, which did nothing).
What did you expect to happen:
The affect of the u command should no longer take place.
How to reproduce it (as minimally and precisely as possible):
Type any text with vim extension enabled
Result:
test me
Use the u command
Result:
(blank)
Try redo with vscode
Result:
(blank)
Which I expect to be:
test me
Environment:
@myzhang1029 , I believe this is right behavior, because VSCodeVim uses its own stack for undo/redo actions. Any undo action made with VIM plugin is actually common edit operation, from VSCode point of view, so there is basically, nothing to redo at that moment
@Nodman Thanks a lot.
so.... what's the solution? I'm constantly accidentally undoing things and losing them forever.
ctrl+r wasn't working for me but I was able to bind redo to a different keybinding:
{
"key": "shift+u",
"command": "extension.vim_ctrl+r",
"when": "textInputFocus && vim.mode != 'Insert'"
},
I rewirte the action on "u" and <c-r>, now it work very well, it use the vscode undo and redo command.
setting.json
"vim.useCtrlKeys": true,
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["u"],
"commands": ["undo"]
},
{
"before": ["<C-r>"],
"commands": ["redo"]
}
],
and I expect the extension do it default.
You are awesome @coppyC. thanks!
ctrl+rwasn't working for me but I was able to bind redo to a different keybinding:{ "key": "shift+u", "command": "extension.vim_ctrl+r", "when": "textInputFocus && vim.mode != 'Insert'" },
It works for me. Thank you :thumbsup:
Now I can use u to undo and U to redo in VScode vim.

Thanks @coppyC and I totally agree with you that this should be the default. This has been an infuriating issue where I've assumed I'd hit some disastrous combination of keys and lost work multiple times. I've even switched back to Atom a couple times due to this issue.
The only thing that worked for me:
"vim.normalModeKeyBindings": [
{
"before":["U"],
"commands":["extension.vim_ctrl+r"]
}
]
Most helpful comment
I rewirte the action on "u" and
<c-r>, now it work very well, it use the vscode undo and redo command.setting.json
and I expect the extension do it default.