sublime_text
sublime_text copied to clipboard
[Feature] Recovery of unsaved files
Problem description
I just accidentally closed a window with an unsaved file (and clicked through confirmation the dialog on auto-pilot). Fortunately I was able to recover the file's contents from the session file.
It would be nice to have some UI to do this.
Preferred solution
Add unsaved files which still exist in the session file to the 'File / Open Recent' menu, perhaps in a separate section for unsaved files, or just listed among the recent files as 'Unsaved - {the former tab title}'.
Alternatives
Alternate UI dedicated to unsaved file recovery would also be fine.
Additional Information
No response
Actually, it looks like what I was able to recover was not the latest version of the file (I'm guessing it was saved the last time the app was closed). So in addition, it would be nice if the current contents of an unsaved buffer were saved to the session file (or elsewhere) on a close without saving so that it could be recovered in full.
This is already possible via hot_exit
@TheSecEng as I understand it, hot_exit only controls the behavior of saving the data on full application exit (which mine is already set to 'always'). My second point above was referring to the unsaved data apparently didn't get saved when closing that specific window (or tab), without exiting the application (other windows were open).
Gotcha, so something like window_hot_exit which lets you close windows but save unsaved views
Yes, exactly. And then expose those unsaved views in the UI somewhere for easy recovery (like in the 'Open Recent' menu item).
When closing a window with unsaved files you're always prompted whether each unsaved file should be saved or not. If you select "Close without saving" - which is not the default - then I don't really see the problem. Old session files are kept in certain situations but that's not a feature that is reliable for recovering unsaved files.
Because sometimes people click through confirmation dialogs without realizing, like I did. In my case I closed a window with several unsaved tabs, clicked the confirm without a second thought, and lost all of them (I was looking at a tab I didn't care about, but lost another tab that I did).
As I said, I found a recent version of the lost file in the session storage, but having a quick way to recover the data (and the most recent version of it) would have been a life-saver.
Yes, I know, if it was something I cared about, I should have saved it in the first place. But looking through the issues with hot_exit it's obvious I'm not the only person that keeps short-to-medium term notes in unsaved tabs, so I can see this as being useful for many.
It doesn't have to keep unsaved data forever (that's what saving is for), but a MRU cache with the contents of the last 'n' (4?) unsaved closed tabs (and maybe discarded versions of saved files too?*) could be really helpful for those 'oh-shit' moments we all have from time to time. It also appears that the data is already being preserved in the session store, just only updated on exit instead of tab close. So theoretically this could be as simple as updating the tab close behavior to update the entry in the session store (like hot_exit does), and providing a minimal UI to recover them into a new tab.
(* these could be discarded the next time the file is saved)
I got used to delete files by ctrl+del as I am too lazy to cleanup recycle bin and quickly dismiss confirmation dialog by hitting enter. Can someone please implement a recylce bin for the recycle bin for the recycle bin to not loose any data when actively overriding all security mechanisms?
Can someone please implement a recylce bin for the recycle bin for the recycle bin to not loose any data when actively overriding all security mechanisms?
If the developers of SublimeText feel it's appropriate to respond to paying user's requests (for features found in other apps) with sarcasm and a complete lack of empathy, then feel free to close this issue. Because I won't be renewing my license.
There is literally one deal-breaker issue that's been keeping me from switching to VSCode. And if not caring about users is the new normal for SublimeHQ then I'll be moving on (as I'm sure a lot of your other users already have).
(To be clear, I don't care much about this feature one way or another, but I do care about how I'm treated, as well as the future directions of this project. Toxic behavior is unacceptable.)
Disclaimer: I am just a hardcore user. I am not a member of sublimehq. I just find it questionable to blaim others for own mistakes.
ST just follows the scheme of vast majority of software here, IMHO. Closing an unsaved file, means loosing it. So there's no point in calling not nooing so a deal breaker. That's just exaggerated.
Disclaimer: I am just a hardcore user. I am not a member of sublimehq.
Good. So there’s still hope for SublimeText.
And now I have to ask you, in what way did you think you sarcastic comment was helpful to anyone? Or do you actually think this is an appropriate place to dunk on people you can’t bother to take the time to understand?
I just find it questionable to blaim others for own mistakes.
Please point out where I ever blamed anyone other than myself. I think I was pretty clear in stating that the mistake of failing to save a file was entirely my fault.
Everyone makes mistakes from time to time. The point of this feature request is that since Sublime is already saving the unsaved data, it could make recovery from one’s mistakes easier and more reliable.
Users may find this helpful, even job-saving, so might appreciate the feature.
ST just follows the scheme of vast majority of software here, IMHO. Closing an unsaved file, means loosing it.
I never said otherwise. Some software also goes a bit above and beyond the norm to be helpful to their users.
So there's no point in calling not nooing so a deal breaker. That's just exaggerated.
Again, please point out where I said the lack of this feature is a dealbreaker. I referred to a missing feature in VSCode which is a dealbreaker for me switching to that product despite all sorts of pressure to do so.
My point in making that comment is that I’ve been a loyal (and paying) Sublime user for some time, precisely because they listen to their users and deliver features that make our lives easier.
This feature is a “nice to have”, and not especially for me, since I know how to dig the file’s contents out of the session file. I was thinking others could benefit from my mistake, so I gave feedback to help make a great product better.
The dealbreaker for me here would be the Sublime community tolerating toxic behavior like yours, and the developers treating their users like you are. If your behavior was representative of the SublimeHQ developers I wouldn’t be renewing my license, and I’d move to another product (even if I had to fix the blocking bug in VSCode myself).