Reputation: 2359
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?
Upvotes: 44
Views: 12631
Reputation: 123716
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
Upvotes: 50
Reputation: 64843
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
Upvotes: 12
Reputation: 45153
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.
Upvotes: 3