Unsaved files should be preserved on quit (hot exit)
Mac OSX 10.10.5 Yosemite, VS Code 0.10.1
Modern apps have a convention of not losing changes when the application quits and files haven't been explicitly saved. Sublime Text is particularly nice in this regard, where newly created or unsaved files are silently preserved on quit and restored when it is launched again. This would be nice for VS Code to support as well.
To Reproduce
- Make changes to a file, or create a brand new unsaved file
- Quit VS Code
Desired Behavior
VS Code immediately quits with no prompt. After relaunching the changed file is restored with changes intact and an unsaved indicator.
Actual Behavior
VS Code prompts you to save the file or discard your changes.
FYI : I'm become a big fan of this after computer suddenly hangup/lost power/cats hit shutdown button/etc and everything get restore after reopen.
That's why I'm not uninstall Sublime yet tho.
+1 I occasionally need to exit my editor quickly and like not having to think about saving when I do.
Would love to have this too. Very useful for scratch buffers and crash recovery.
+1 would love to have this feature too - for the same reasons elad mentioned. Actually not having this feature makes me using Sublime again.
This comment has been removed because it does not conform to the guidelines in the Code of Conduct for Microsoft open source projects, as covered here: https://opensource.microsoft.com/codeofconduct/
From Sublime Text, Preferences
// Exiting the application with hot_exit enabled will cause it to close
// immediately without prompting. Unsaved modifications and open files will
// be preserved and restored when next starting.
//
// Closing a window with an associated project will also close the window
// without prompting, preserving unsaved changes in the workspace file
// alongside the project.
"hot_exit": true,
Quite frankly the hot_exit feature of SublimeText is so important to me That I won't even consider another editor that doesn't have the feature.
One reason this is the case, is my machine sometimes doesn't come out of sleep so I just do a forced reboot - no problem as all of my changes will be preserved.
Also note: the hot_exit feature also preserves the undo stack for each file this is quite valuable.
Guys please implement this feature this is the only reason why I'm not even consider using VS Code on a regular basis. My laptop shuts down unexpectedly at times so if I'm using Sublime I will be having no issues
@jithurjacob stick with Sublime. Neither Atom nor Code are getting close anytime soon. I tried and failed to switch.
Same here, hot_exit is mandatory to try something else than sublime... would like to try, but can't imagine working again with editor that can't give me this security feelings that sublime is giving to me.
I often switch between 2 or 3 projects, that hot_exit let me do that with abslolutly no pain. Have to check code in another project, 3 new files in the current, no problem, project switch in the same window, copy past what i need, i come back to the working project, all is there ... even new file, undo etc ...
other situation, machin crash, need of restarting windows etc ... is osblolutly painless, as each project keep all files saved or not, open, i get back my tab in each project, can'l leave without this ,D
I really need this feature before I switch to VS code. It's very handy, easy to quit the editor. Many times, I intentionally leave some of my temporary work unsaved in Sublime for many days.
what's the status of this feature now? I just moved from windows to mac and found that sublime doesn't have the feature anymore!!!
ref https://github.com/Microsoft/vscode/issues/906
I have deleted my initial comments on this feature request because it was my personal opinion and not the VS Code opinion. We think this is a perfectly valid feature request.
@bpasero I'm glad to hear that and I'm sure others are, too. I can testify that as far as Sublime replacements go, Atom doesn't look too good because it feels very slow and laggy, and I would love to have the option to switch to VS Code. That said, losing data is something that in 2016 should be off the table. I want my tabs restored when I reopen the browser and I want my unsaved/untitled buffers restored when I reopen my editor. :)
Quoting my comment on the similar Atom issue referenced just above my comment:
In Sublime I can just keep having drafts, kill it any time I'm presenting or having a sole-use of my laptop, and open it later with all drafts intact. The same even if my laptop crashed while Sublime was opened.
I'd love to see this happen with Code now that I'm using it way more often.
With the move to daily builds in Code (https://code.visualstudio.com/blogs/2016/05/23/evolution-of-insiders), I think this feature is even more important.
If I have to restart my text editor every day, and I'm using it as a scratchpad, I don't want to have to save each and every scratch pad once a day, when it's just temporary note files.
It would be great if we can just restart for an update, and have it exactly where we left off.
Browsers remember last saved tabs, so it would be cool if Code can also remember your open buffers as well =).
Installed Code today and the first thing I tested was tabs, the next thing I tested was hot_exit, disappointed on both counts. However I can live without tabs, as ctrl+tab works as expected. Will not be making the switch or recommending Code to anyone soon because of hot_exit. Guess I'll be sticking to Sublime Text for now.
- 1 Would be very useful for my surface book and its dead sleep :)
+1 - I would absolutely love this feature!
What is the current status of this feature? When we can see this feature in action?