Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code open last files

I gave a chance to Visual Studio Code as my primary editor. I had been using Notepad++ and afterwards I have been using Sublime Text 2 and 3 for few years. I do see potential of this editor and I really like it, but there is one thing I am strongly used to.

Notepad++ and Sublime Text has this feature, I can edit file and DON'T save it anywhere. After restart Notepad/Sublime Text this file is there ready for me.

Other workflow could be open any file from my local storage, close VS Code and start it again. This file will not open!

I know about that when I open folder and restart VS Code, folder is open and files as well. But is there any way how can I manage to have opened files after restart without having opened folder?

like image 827
Milan Leškanič Avatar asked Oct 30 '22 00:10

Milan Leškanič


1 Answers

Edit: This is now implemented:

// Controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.

"files.hotExit": "onExit"


I use the insider release, and in the current version (1.3.0), vscode doesn't keep unsaved file. I think there is a feature request for that.

Got it: https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/8568343-keep-unsaved-files-after-crash

You can vote for that feature, like I did !

On the other hand, You can tell in settings if you want to re-open previously opened folders, but not files.

"window.reopenFolders": "all"

like image 66
Eric Bole-Feysot Avatar answered Nov 22 '22 23:11

Eric Bole-Feysot