I'm using latest version of VS code (1.9.0).
After I undo (ctrl+z) something, and save the file (ctrl+s), then I cannot redo anymore (ctrl+y).
I would like to go back and forth during the editor is running same as Sublime or other editor. Can anyone solve this problem? Thank you.
In my case it was the
Format On Save
in settings that caused the undo/redo buffer to be flushed when saving files in VSC.To get around this you can set
Format On Save Mode
tomodifications
(requires source control like git)or
modificationsIfAvailable
(this also requires source control to help with this issue else VSC will format the entire file and flush the undo/redo buffer)Voila!!! I had both
Format On Save
enabled and a redo buffer that was working after saving the file. Truly wonderful!If this doesn´t help make sure to try to disable all extensions to see if one of them might be causing the buffer flushing.