Dear VSCode,
Thank you very much for this project.
Although, the feature we might need is the Undo/Redo history like in the VS2019 or Photoshop, for example:
| Visual Studio 2019 | Photoshop |
|:-:|---|
|
|
|
or at least colored/highlighted buttons(without any history list) or counters (these numbers below show the number of Undoings the coder did (or number of Redo available to restore)):

or an indicator if any Redo is available.
The reason of this request is that without it the VSCode forces you to recheck if any edits have undone after returning to the project by clicking Ctrl+Shift+Z/Ctrl+Y and Ctrl+Z repeatedly etc. to ensure and not lose the undo/redo history by an accident.
In short, the there are 3 ways to implement.
1. The Undo/Redo history window(like on 1 picture above)
2. A global or per file Redo available counter(like on 2 picture above)
3. A global or per file Redo indication (Redo exists or not)
Just, imagine a situation:
You are coding a big code.
1. Ctrl+Z in one file so to view some code you rewrote.
2. Open/View different file.
3. Forget that you Undo first one
4. Return to first one
5. Write 1 char or reformat/beatify it accidentally
6. The whole Redo history of first file is **GONE** ... oops (what if full block of such or even more?!)
So, this request might eliminate this problem.
It might be already nearly implemented:
The Undo/Redo might already is stored in some object map or such, so just iterate through and do stuff. I.e. show the map in list or length of each map per file.
Interesting link which shows how might Emacs have such "feature".
Best regards
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
@alexdima Sorry, may I ask how to correctly vote for backlog? Should the votes go to bot's message or the first message? Asking because of more votes, currently, exist on bot's message, not the first message. Will this impact the suggestion?
At the very least the VS Code should implement a Local History (https://github.com/microsoft/vscode/issues/26339) as soon as possible to cover any irrecoverable work loss. It makes no sense not to prioritize issues like this. Nobody really commits to Git so often that they would be exempt from this - at the very least, this could be implemented by having a second hidden Git repository, committing every change automatically on the background, and then letting us access that repository using any standard Git tool. Until someone finds the time to also implement a user friendly interface, this would be plenty and our basic needs would be covered. And it's not even that hard to do, check out https://stackoverflow.com/questions/505467/can-i-store-the-git-folder-outside-the-files-i-want-tracked :)
at the very least, this could be implemented by having a second hidden Git repository
Doesn't it already have some internal undo history logic? I mean, what happens when you press Ctrl+Z? The reason why asking this because the same text inputted same way into notepad.exe or similar undone differently comparing VSCode. VSCode's undoings are more logical and structured.
Also, the Git logic will not prevent from Redo overwrite at least some modified version of it.
@eamodio Sorry for pinging, but it's really important to know where people should append upvotes(likes?): to bot's or first message or these are summarized. Currently, it's 10 + 15, so 25 > 20, right? If different people upvoted comparing these buttons, of course.
Previous question to assigned person got no answer, so, I hope if you might answer.
Also, thank you all very much for upvoting this request. It should help the developers really much! Most developers might lose their edit history after overwriting their Undoings without this issue solved. Don't confuse with Version control systems(i.e. Git) which will compare between commits, but not files' Undoings.
Best regards and be safe!
I don't know what the bot is counting. I believe it is counting votes on the first comment in the issue.
FYI @JacksonKearl @kieferrm -- maybe the bot should count votes also on its own comment.
Thank you very much, dear @alexdima
maybe the bot should count votes also on its own comment
Indeed, or, at least, slightly clarify what to upvote :)
Bot counts +1 reactions on the original issue. Added a section to the docs and a link to it to the comment. See: https://github.com/microsoft/vscode/issues/102982
Bot counts +1 reactions on the original issue. Added a section to the docs and a link to it to the comment. See: #102982
Is that what you have added, recently? https://github.com/microsoft/vscode/wiki/Issues-Triaging#up-voting-a-feature-request
Thank you very much, dear @JacksonKearl! This definitely clarifies it.
(re-pasting my question here )
My extension (https://github.com/boltex/leointeg) uses file system api to implement custom 'editors' for my needs as indicated in the docunmentation here https://code.visualstudio.com/api/extension-guides/virtual-documents#file-system-api .
I need to be able to 'block' or 'clear' undos when closing or switching from one of them to another.
It used to be that doing vscode.WorkspaceEdit "rename" operation would 'clear'/'block' all undos for the newly named document to traverse across the point where the document was renamed, but lately the newer versions of vscode tries to open a document with the old name when pressing ctrl+Z on a newly renamed document (in a custom filesystem)... Is there a way to disable that? Or a way to clear the undo stack for a given document URL? or for a filesystem scheme only in particular?
Thanks!
@mjbvz Please see the question above about undo/redo and custom editors.
Most helpful comment
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!