-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Auto-save unsaved files #906
Comments
I would like to second this request. If this is to compete at all with Sublime and others, this needs to be added. Makes it so much more useful and I feel "safer" using it if I don't have to worry about loosing files. |
In the docs there is information about
Is this option working? |
Yes |
@bpasero that strange, maybe I'm misunderstanding this option but when I try following steps:
file is not saved as dirty and vscode asks me for saving the file. My settings.json file looks like below: Isn't this flag enables auto-saving as in Notepad++ described in first post in this issue? |
@pascon works for me, please attach a video of what you try and see. |
@bpasero I think this is about untitled files |
Ok, for untitled files we need to ask the user which filename to pick. |
HI
No, that's the point. Don't ask anything. Make up a temp file name, store and reopen when vscode is started next time. See my OP:
Cheers |
@weeblr why do you assume this feature works if the feature request is still open? |
@bpasero Sorry, I'm confused. From your previous comment, I understood you wanted to implement that feature by prompting the user for a name, in case the file didn't have one already. So I replied that that's not how it should be implemented, per my request. Rgds |
@bpasero ok, no problem, understand now. |
@bpasero this is exactly as @weeblr wrote. In vscode UserVoice there are many requests for auto-saving untitled files as it's available in another editors (Notepad++, SublimeText, Atom, etc...) - without asking for a filename, for example: Is this feature in consideration to implement in next releases? |
Yup, this would be super awesome for me as well! =). I often use my text-editors as a scratch-pad. Sublime Text has had this for a while, and Atom had it via third-party extensions (e.g. save-session. However, Atom recently rolled it into the core - perhaps some of their discussion might be helpful to our implementation? Relevant PR - atom/atom#9968 |
Incredibly disappointed that this wasn't included in the initial release. Mac users are used to essentially all of their applications working this way. I just lost a lot of work because I incorrectly assumed that Microsoft was making this app Mac-friendly. This is not beta software, this is production software. Users are going to lose data because this is a standard feature for Mac document / code editors, Sublime included. There are very few excuses for a modern text editor to lose unsaved user data in the event of an unexpected application termination. |
@bpasero I just read issue #101 linked above by @katopz, and I think I understand why you would not favor this change. This maybe a misunderstanding.
No, we don't expect changes changes to be written to files. We expect changes, ie the current editor content, to be saved. Nobody said it was to be saved in the actual file being edited. On top of possibly failing, as you hint at, this might not be what you want (ie you made a change, but this was no good and you actually don't want to keep it) So the point is save the "state" of the editor, in a separate area probably (and please, save that data in a portable way, not in the user folder #329 !).
You're probably actually behind what others do. Saving on the fly is common feature in many IDE and editors, but basically, it's still missing what this feature request is about. To auto-save, you need to have a file name. There are many situations where we don't want to have to choose a folder, and make up a name, and then have that useless file lying around. Rgds |
@weeblr-dev I have removed my comments on #101 because they do not reflect our latest thinkings. Sorry for the confusion. It is a perfectly valid feature request. I would still close this one as duplicate of #101 though if you are ok with it? |
Ok good. |
This feature |
I was shocked that VSCode did not support autosaving files when I just lost a lot of work after a crash and was expecting my files to be automatically recovered. I looked around and found that this feature is available, but is not enabled by default! What bad UX for a user to discover this preference only after losing work! Just about every other code editor I use (Emacs included), have autosave enabled by default. Now, the autosave feature in some editors writes to separate files, so the user still has the option of not recovering. VSCode can implement that behavior as another preference setting, but use it as the default behavior instead of completely "off". |
Having now explicitly set my None of the options for that preference works in that scenario--only the tried-and-true explicit commit (save or save all) coupled with autosave to temp files will work, IMO. BTW, my recommendation on the autosave behavior would not be a duplicate of #101 as it's more general and has nothing to do with quitting the editor. |
A very handy feature in Notepad++: one can just open a new editing tab, or multiple ones, cut and paste stuff, or scribble a few notes.
Upon closing the application or shutting down the computer, instead of the usual "Do you want to save/not save/cancel" (as vsCode does), all those unsaved and unnamed files are simply saved to a temp location by the app, and restored in the same state upon next start.
Rgds
The text was updated successfully, but these errors were encountered: