Visual Studio Code open tab in new window
On Windows and Linux, press CTRL+K, then release the keys and press O (the letter O, not Zero).
On macOS, press CMD+K, then O (without holding CMD).
This will open the active file tab in a new window/instance.
This is a very highly upvoted issue request in Github for Floating Windows.
Until they support it, you can try the following workarounds:
1. Duplicate Workspace in New Window [1]
The Duplicate Workspace in new Window Command was added in v1.24 (May 2018) to sort of address this.
- Open up Keyboard Shortcuts Ctrl + K, Ctrl + S
- Map
workbench.action.duplicateWorkspaceInNewWindow
to Ctrl + Shift + N or whatever you'd like
2. Open Active File in New Window [2]
Rather than manually open a new window and dragging the file, you can do it all with a single command.
- Open Active File in New Window Ctrl + K, O
3. New Window with Same File [3]
As AllenBooTung also pointed out, you can open/drag any file in a separate blank instance.
- Open New Window Ctrl + Shift + N
- Drag tab into new window
4. Open Workspace and Folder Simultaneously [4]
VS Code will not allow you to open the same folder in two different instances, but you can use Workspaces to open the same directory of files in a side by side instance.
- Open Folder Ctrl + K,Ctrl + O
- Save Current Project As a Workspace
- Open Folder Ctrl + K,Ctrl + O
For any workaround, also consider setting setting up auto save so the documents are kept in sync by updating the files.autoSave
setting to afterDelay
, onFocusChange
, or onWindowChange