If I open a file in Visual Studio Code from the command line or from within File Explorer, each file will open in a separate Code instance. Is there a way to make them all open in the same instance? I.e. add them all to the 'Working Files' list?
-
Do you mean when no other instance of VS Code was running at the time you invoke this or when an instance is already opened?Benjamin Pasero– Benjamin Pasero2015-09-23 14:16:10 +00:00Commented Sep 23, 2015 at 14:16
-
I mean when an instance is already running.DavidA– DavidA2015-09-24 09:33:20 +00:00Commented Sep 24, 2015 at 9:33
3 Answers
Upcoming version will have a new option files.openInNewWindow which you can set to off to always open files into the last active instance. This is then identical to starting VS Code with the -r option but is much nicer to use (e.g. when you open a file from the desktop).
Update for our VS Code 1.0 release:
The setting is available as window.openFilesInNewWindow
4 Comments
"default", "on", and "off". The one you should choose to get the desired results is "off".false but @ChaseSandmann is correct, it should be set to "off"You can use the command line option of -r or --reuse-window to assure it opens in the last active VS Code window
You can review the other options here
2 Comments
code Folder1/File1.txt Folder2/File2.java Folder3/File3.css
This command opens three files in one instance of the editor. All files are going to be added to the working files list. This even works with much more files in the parameter list.