Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a Visual Studio Code workspace in a new window

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.

like image 454
Joe Casadonte Avatar asked Jan 28 '18 05:01

Joe Casadonte


2 Answers

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

search: open folders in new window set: ON

like image 156
Juan David Castañeda Avila Avatar answered Sep 18 '22 14:09

Juan David Castañeda Avila


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"
like image 23
mPrinC Avatar answered Sep 21 '22 14:09

mPrinC