I did 7-8 Ctrl+Z
mistaken in explorer panel in VS Code and some files have been changed now. And it seems Ctrl+Y
doesn’t work in explorer to bring everything back again!
I wanted to make sure if there is anyway that I can do the opposite of those Ctrl+Z
s I did in explorer?
PS: The reason I did those Ctrl+Z
s was because I changed name a variable using Ctrl+Shift+H
and thought by doing Ctrl+Z
in explorer I can undo those name replacements but it seems I have lost a lot of codes and files!!
2
Answers
You can use redo command:
Ctrl+Shift+Z
. (command+Shift+Z on macOS)Keyboards shortcuts is customisable in VS Code.
Go to
File > Preferences > Keyboard Shortcuts. (Code > Preferences > Keyboard Shortcuts on macOS)
Search for
Redo
in search bar.You can find the shortcut there. Or change it if you want.
If you have used Replace all (
Ctrl + Shift + H
), you may need to open individual files.P.S. You may not be able to revert if:
I would suggest to try testing these in a new file and then apply your findings.
Unsaved files can be stored temporarily.
Have you tried checking the following directories?
Windows User
For Linux users they are found at
Insiders on macOS: