-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsaved files should be preserved on quit (hot exit) #101
Comments
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/ |
Quite frankly the hot_exit feature of SublimeText is so important to me One reason this is the case, is my machine sometimes doesn't come out of sleep Also note: the hot_exit feature also preserves the undo stack for each file |
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 #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:
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 |
|
+1 - I would absolutely love this feature! |
Not sure if it's a difference in OS, but on Windows I think it's only On Tue, Nov 15, 2016 at 2:41 PM, devployment notifications@github.com
|
@devployment currently only cmd+q will trigger hot exit on Mac (#13305). Enabling hot exit all the time for a particular folder is being discussed in #15467. @seanwcom support for empty (no folder) workspaces is not yet implemented, see #13733. |
Ok. Totally missed those. Thanks for the pointers. Will check the linked tickets. Keep up the great work! |
"Hot exit save" copies the entire content to second file if you're just switching from first file to second file without saving first file. Very dangerous cause totally corrupts the second file with content of first, if you are unaware of what happens and you close second file with out "undo". |
@bpj101 each backup file is saved to a path based on the original file's path, so something like that shouldn't happen. Do you have repro steps showing the problem? If so, please create a new issue as > 50 people get notifications when a comment is made on this issue. |
In app.js file, notice content [image: Inline image 1] In app2.js notice content [image: Inline image 2] Back in app.js file. Just add black lines to top of code. Notice indicates Now, without saving app.js, I click on tab to go to app2.js [image: Inline image 3] Now notice the content from app.js has been copied to replace content in [image: Inline image 4] I hope this makes sense. Thanks On Wed, Nov 16, 2016 at 10:02 AM, Daniel Imms notifications@github.com
|
Thanks @bpj101, the images don't seem to make it through when commenting via email though |
Sorry. I hoe the written comments in the email helps. On Nov 16, 2016 11:47 AM, "Daniel Imms" notifications@github.com wrote:
|
Sir @bpj101, If you just edit your previous comment with images, It will better. |
I just pushed empty workspaces which also closes off the crash recovery story so I'm closing this off ✨ Empty workspaces should come in the next Insiders build. |
Has this been released, or is going to be released soon? There are a ton of comments to try and figure out if the original story was rejected, fixed, or if something else but similar was put in place. |
@g5codyswartz to be released soon (tomorrow), you can always check the milestone the issue is assigned for when it's expected to hit the stable release. |
Edit: Hah, beat me by seconds @Tyriar. preemptive tl;dr: Should be released in, like, 24 hours, with the 1.8 release. @Tyriar's comment farther up shows that he broke this issue into a few different sub-issues to better track the relevant parts that needed to be implemented, in case you hadn't seen those. Also, you can always check the iteration plan for an upcoming release and see if a feature/bugfix/etc. made it onto the list, as well as check it's completion state! Hope that helps! Also, thanks so much for the hard work on this @Tyriar and @bpasero. |
My apologies for commenting on a closed issue, but this seems to be the best place to ask. Hot exit seems to be working great on any unsaved files, but should saved files also be restoring? Perhaps I'm missing a setting somewhere, but I've looked through and didn't see a way to set that. My expectation is that dirty or not, the full session would restore. Right now if I have 2 dirty files, 1 untitled (dirty) file, and one saved file then the first three are restored, but the saved file is not brought back. I'll be happy to open a new issue if needed, but thought I would check here first in case I'm just missing a setting. Thanks for everyone's effort on this! |
I need this for "Untitled" files. Everytime I close VSCode manually, it is prompting me to save untitled files. If I don't save it, then its not restored. I don't want to save those untitled files, I just use those as scratch notes. If I ctrl+alt+del to force exit then it works, but i prefer not to ctrl+alt+del it. |
@Noitidart it should behave exactly as you expect right now.
although based on the description I'm not sure that's right either. All I know is that on Windows 10 x64 and the last many VS Code releases, I can have one or more untitled, unsaved buffers open and modified and they restore just fine through closing and opening, regardless of how I seem to close it. |
Oh thanks @joshsleeper will try now! Mine was set to "one" Edit: https://screenshots.firefoxusercontent.com/images/c80f3433-b728-4f38-a7a4-c3775f10fac8.png |
editIf my suggestion doesn't help, rather than keep bumping this rather old thread, just submit a new issue proper and tag me so we don't tick people off any more than we might've already. ;) @Noitidart drat! Just to be sure, you are using the correct setting, right? Just grasping at straws, because as of #28580 it should totally be working properly and certainly does for me. Make doubly sure you don't have any invalid user settings maybe? |
@joshsleeper found it! Thanks so much for your help! There was a setting called:
Mine was set to "onExit" I changed it to "onExitAndWindowClose" and it's perfect! VSCode rocks!! |
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
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.
The text was updated successfully, but these errors were encountered: