Reputation: 1545
I am working a lot with ctrl + R
in order to switch between projects, and I always use 'cmd' to force it to open in a new window (or bring into focus an already opened matched window). This way I never accidentally close active projects.
It's a bit annoying to always use the 'cmd' key when choosing a project to open, is there a way to configure VSCode to use it by default?
Upvotes: 14
Views: 4673
Reputation: 61
Got to Settings (Cmd + ,), type "folder" in the search input box, a setting called "Open Folders In New Window" will come up. The "On" option will open projects in new window, keeping the existing project open.
Settings, folder, Open Folders In New Window
Upvotes: 6
Reputation: 362
There is no built-in way to do this, but there are a few workarounds.
One way is to use the Open in New Window extension.
Another way is to use a custom command to open projects in new windows. You can create a custom command like this:
{ "command": "vscode:open-in-new-window", "args": ["${workspaceFolder}"] }
Upvotes: 0
Reputation: 829
"window.openFoldersInNewWindow": "on"
can be added to settings.json
Controls whether folders should open in a new window or replace the last active window. Note that there can still be cases where this setting is ignored (e.g. when using the --new-window or --reuse-window command line option).
Upvotes: 32