In Search Panel should be button "Undo Replace All", whitch undo all "replaced" changes in all files.
Should to be work like standard undo function, but only for files whitch "Replace All" made a changes.
It looks something simple to introduce. Am I right?
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
Bot, as usual, will look for something that has nothing to do with my entry...
Command-undo Replace all
Might not be trivial because there could be edits to the file at the location where replace has happened and undo has to ignore that.
@sandy081 So the button should work only until some manual change is made to these files.
It would be useful anyway.
IntelliJ IDEA family of IDEs has this feature.
Starting to see the above comment as the reality more and more... :-/
It would be really useful to have this feature, I'm git stashing after global replace all at the moment to work around (not ideal).
I support this for instances when I'm not paying attention and accidentally do find-replace to an entire project instead of just the open file. Cleaning up the mess is both humiliating and absurdly tedious.
I hope we cann't undo all files , If this possibility there mean its great . please share the same how to undo all replaced files.
Replace all feature is very helpful, but we should be careful when applying this with all files.
Better we should apply some filters like file extension , include and/or exclude files , I attached reference screenshot also.

I think perhaps we need this command, because if i replace some thing by mistake,i need to replace them by replacing command again.
Or Anyone who have other way?
Thanks.
At least there should be a warning if you accidentally forget to fill out the lower field and replace every occurrence of the searched item with an empty string.
@mortizw I mean situations when I have already changed something and LATER I realized that I did it incorrectly or unnecessarily.
A warning is not enough for this.
Might not be trivial because there could be edits to the file at the location where replace has happened and undo has to ignore that.
@sandy081 Not really. The "replace all" action should be no different from a manual change that lands on the "undo" stack. Undo is a stack and you can only undo the most recent change. "Replace all" action should land on this very stack, and be undoable when it's on the top of the stack. In this case, there's "no [other] edits to ignore". That's how it works in IntelliJ IDEA.
Worth noting, hitting ^Z in IntelliJ IDEA will trigger an alert like "Do you want to undo replace all?" if "undo all" is on top of the undo stack. This is because a typical ^Z action is usually very small, except when it's undoing a "replace all", and doing so could potentially be disastrous. (But not really since you can CTRL+SHIFT+Z to undo the undo...)
I support this for instances when I'm not paying attention and accidentally do find-replace to an entire project instead of just the open file. Cleaning up the mess is both humiliating and absurdly tedious.
Well, I just accidentally modified 423 lines of code in 123 files.
And I just screwed up my regex, and now have to fix 132 changes manually.
This is why I just use JetBrains IDEs for development now... #youGetWhatYouPayFor
@RavenHursT I mean, you're right, but there's no way I'm going to pay JetBrains' prices. I'd love to donate a bit to VSCode, but not nearly what JetBrains charge (at least not as a lump sum).
Besides, JetBrains IDEs have many other issues that bother me much more:
Chiming in — this would be a great (albeit nontrivial) feature
Thanking myself for googling this up right before a major replace all...
Chiming in too.
Of course I could be wrong but I don't see why this is a non-trivial feature to implement. If I do a replace all and I go to an individual file, I can CTRL+Z and undo the replace action in that individual file, and thus I can do this in every file that has had the replace action. So it would be as simple as undoing the last replace call in every file that had that replace action.
Definitely a much needed feature considering how powerful vscode's replace all feature is.
Most helpful comment
IntelliJ IDEA family of IDEs has this feature.