You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just lost hours of work because I tried to use a Sublime Text feature that errored out and replaced the whole content of the file by an error message. I stupidly thought it was a new window (like the result of a search), and closed it. Triggering an automatic save because I have save_on_focus_lost set to true.
Reopened the file and tried to revert the change but of course at that point it's too late.
Preferred solution
It would be a very useful feature if like many other text editors or IDEs on the market, ST would be able to persist the change history even after a file is closed. At the very least while the ST is not closed. This could of course be something that could be left off by default if people are concerned about performances on larger projects.
Alternatives
The only other thing that would have saved me here (besides disabling save_on_focus_lost), would be a confirmation box for the save / close because the change was massive (several hundred lines to 1). But this really isn't a valid solution here IMO.
Additional Information
For me, this is quite literally THE biggest feature I'm missing from ST today. When you work on a big project, you often open files, close them, make changes... Re-opening a file and wanting to revert changes is something we've all wanted to do at some point.
PS: I tried searching current and historical issues and couldn't find this specific feature request. Apologies if I missed it.
The text was updated successfully, but these errors were encountered:
Xaelias
changed the title
Persis edit history after file closure
Persist edit history after file closure
Nov 14, 2024
ST actually persists undo history in its session_file (or project/workspace) - at least if hot_exit is enabled (which it is by default).
If a single file however is opened in a separate window which has no project/workspace assigned, there's no location to store any information to. Thus closing the window deletes all associated information/data.
It doesn't make sense to track all possibly opened files from any location as it is unclear whether they will ever be opened again or remain on there location etc.
Problem description
I just lost hours of work because I tried to use a Sublime Text feature that errored out and replaced the whole content of the file by an error message. I stupidly thought it was a new window (like the result of a search), and closed it. Triggering an automatic save because I have
save_on_focus_lost
set totrue
.Reopened the file and tried to revert the change but of course at that point it's too late.
Preferred solution
It would be a very useful feature if like many other text editors or IDEs on the market, ST would be able to persist the change history even after a file is closed. At the very least while the ST is not closed. This could of course be something that could be left off by default if people are concerned about performances on larger projects.
Alternatives
The only other thing that would have saved me here (besides disabling
save_on_focus_lost
), would be a confirmation box for the save / close because the change was massive (several hundred lines to 1). But this really isn't a valid solution here IMO.Additional Information
For me, this is quite literally THE biggest feature I'm missing from ST today. When you work on a big project, you often open files, close them, make changes... Re-opening a file and wanting to revert changes is something we've all wanted to do at some point.
PS: I tried searching current and historical issues and couldn't find this specific feature request. Apologies if I missed it.
The text was updated successfully, but these errors were encountered: