VS Code drag tab to new window

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.

  1. Open up Keyboard Shortcuts Ctrl + K, Ctrl + S
  2. Map workbench.action.duplicateWorkspaceInNewWindow to Ctrl + Shift + N or whatever you'd like

Duplicate Workspace in New Window

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.

  1. Open Active File in New Window Ctrl + K, O

Open Active File in New Window

3. New Window with Same File [3]

As AllenBooTung also pointed out, you can open/drag any file in a separate blank instance.

  1. Open New Window Ctrl + Shift + N
  2. 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.

  1. Open Folder Ctrl + K,Ctrl + O
  2. Save Current Project As a Workspace
  3. 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

AutoSave


■New Window with Same File

  1. Press CTRL+SHIFT+N to create a default new window.

  2. Drag the tab into this new window.

■Command Line

  1. Add C:\Users\Allen\AppData\Local\Programs\Microsoft VS Code to system path.

  2. Type this command in terminal.

PS D:\xampp\htdocs\bi>code vendor/bin/../composer/autoload_files.php -n

■AutoHotKey

  1. Compile this ahk script and execute it.

 

+!v::
clipboardstr := Clipboard
run, code %clipboardstr% -n
return
  1. Right click on the tab and then press shift+ alt+ c in vscode can copy file path to clipboard.

  2. shift+ alt+ v open this page to new window.