18

In Visual Studio Code, can I open a workspace in a new window in one keystroke? I tried using the macros extension, defining the following:

"macros": { "openWorkspaceNewWindow": [ "workbench.action.newWindow", "workbench.action.openWorkspace" ] } 

which does, in fact, open a new window, but then it ignores the new as it calls openWorkspace.

What I'm trying to do is not replace the current window with the newly opened workspace; I want to retain the current window and open a new one with the workspace in it.

1
  • 1
    I'm unable to open a new window and then open the workspace in that window in the GUI. When I do, nothing happens, and the files don't show up in the VSC explorer. Commented Feb 25, 2018 at 1:54

4 Answers 4

23

On Windows/Linux - File > Preferences > Settings On macOS - Code > Preferences > Settings

search: open folders in new window set: ON

Sign up to request clarification or add additional context in comments.

3 Comments

I turned it on, now how can i use it?
@Dylan not sure what the default keybinding is, but the command I use is called File: open recent... if you have this setting turned on, it should open a workspace in a new window
This worked for me until about 2 weeks ago, now it doesn't, it seems something has changed (v1.105.1). I specifically was/am opening a second workspace via File->Open Workspace From File
7

You can change the editor behaviour by holding the (macOS: Option key or Cmd key, win: Ctrl key or Shift key) when opening from File > Open Recent > ...

You can also set the settings as well to do it as a default:

"window.openFoldersInNewWindow": "on" 

Comments

0

CTRL + P : workspaces : "Duplicate as a workspace in a new folder" alternatively you can put a shortcut for it with "CTRL+K+S" to open keybinds settings and search for it and replace CTRL + SHIFT + N which opens a blank workspace. Furthermore few remarks that can help in developement :

  • you can use "Switch window" (by default it doesn't have a shortcut) to switch between window in the same workspace.
  • you can use CTRL + R to change between projects and hold CTRL in that menu so you can open it in a new window.

Hope that helps my fellow Programmers :).

Comments

-1

This extension does what I want:

https://github.com/sadesyllas/vscode-workspace-switcher

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.