Undoing Replace in All Files


#1

I did a “Find in Files…” from the “File” menu, and typed in a replacement, then hit replace.

I thought this would just replace the next place where the string was found, but it replaces everything in my entire workspace instead.

I checked the edit menu and could not undo the action. (It would only allow me to undo things on a particular file.)

How can I undo a replace in all files?


#2

There’s no built-in way to do this. The best thing would be to revert to a previous commit (if you’re using Git) or to find in files and then undo it on an individual level for the instances you want.


#3

That’s a little scary, but alright!

I’ll be much more careful when using that in the future.