IssueRaiser

VSCodeVim Undo stack should be synced with VSCode undo stack

VSCodeVim undo is not synced with VSCode undo. I've provided a couple different issues/test cases below to illustrate what I mean: **Simple undo** VSCode and VSCodeVim seem to maintain different undo stacks, such that pressing `u` in VIM adds to the VSCode undo stack so that doing a VSCode undo (`CMD-Z`) undoes the VIM undo. `u` and `CMD-Z` should have the same function and share a common undo stack. **Search Replace** When doing a vim-based search and replace, one change with all the replacements is pushed to the VSCodeVim undo stack, whereas one change for each replacement is pushed to the VSCode undo stack. It's easy to get confused about the state of the document if you make a replacement, then press `CMD-Z` thinking you've reversed all the changes, make some other changes, then have to backtrack to revert the rest of the replacements. I'm not familiar with the extension architecture for VSCode, so I'm not sure what is technically possible here. I can break these off into separate issues if you'd prefer. *thumbs-up* 👍 this issue if it personally affects you! You can do this by clicking on the emoji-face on the top right of this post. Issues with more thumbs-up will be prioritized. ----- ### Simple undo ***What did you do?*** Press `i`. Type some text: `PIZZA`. Press escape. Press `i`. Type some more text: ` IS GREAT`. Press the `u` key to undo. Press CMD-Z. ***What did you expect to happen?*** " IS GREAT" should disappear upon pressing `u`. "PIZZA" should disap

Posted by casey-speer on Apr 10, 2017, 4:38 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (Other)

VSCodeVim Undo stack should be synced with VSCode undo stack

casey-speerApr 10, 2017, 4:38 PM

VSCodeVim undo is not synced with VSCode undo. I've provided a couple different issues/test cases below to illustrate what I mean: **Simple undo** VSCode and VSCodeVim seem to maintain different undo stacks, such that pressing `u` in VIM adds to the VSCode undo stack so that doing a VSCode undo (`CMD-Z`) undoes the VIM undo. `u` and `CMD-Z` should have the same function and share a common undo stack. **Search Replace** When doing a vim-based search and replace, one change with all the replacements is pushed to the VSCodeVim undo stack, whereas one change for each replacement is pushed to the VSCode undo stack. It's easy to get confused about the state of the document if you make a replacement, then press `CMD-Z` thinking you've reversed all the changes, make some other changes, then have to backtrack to revert the rest of the replacements. I'm not familiar with the extension architecture for VSCode, so I'm not sure what is technically possible here. I can break these off into separate issues if you'd prefer. *thumbs-up* 👍 this issue if it personally affects you! You can do this by clicking on the emoji-face on the top right of this post. Issues with more thumbs-up will be prioritized. ----- ### Simple undo ***What did you do?*** Press `i`. Type some text: `PIZZA`. Press escape. Press `i`. Type some more text: ` IS GREAT`. Press the `u` key to undo. Press CMD-Z. ***What did you expect to happen?*** " IS GREAT" should disappear upon pressing `u`. "PIZZA" should disap

Comments (0)

No comments yet. Start the discussion.

Comment on this issue