Home > Software engineering >  Remember previously open files when launching Visual Studio Code to edit a file
Remember previously open files when launching Visual Studio Code to edit a file

Time:06-17

If I launch Visual Studio Code directly it remembers all the files I had open previously. The issue I have is if I (under Win10) right click a file and select "Open With Code". If VS Code is already open everything is file. If VS Code is not open, it will launch and open the file, but forget all the files I had previously opened.

This seems like unexpected (and non-consistent) behavior. Is there a way to get VS Code to launch from "Open With Code" but have it also open all the files I had opened previously? Basically, act the same as if VS Code was already opened when I clicked on "Open With Code".

CodePudding user response:

i dont think there is. i would just get on their GitHub issues page and post a bug error. im sorry i cant help any other way!

CodePudding user response:

Add the following line to your setting.json (Code Menu > Preferences > Setting) "workbench.editor.enablePreview": false

This happens because the VS Code opens the files by default in preview mode, so whenever the new file name is clicked from explorer, the opened file closes and the new file is visible.

  • Related