VS Code with multiple windows on a Mac
⌘⇧N opens a new VS Code window; open a folder in it and you have two projects side by side. To pull a single file out into its own window, use View: Move Editor into New Window from the command palette. Switch between windows with ⌘` or VS Code's own Switch Window picker.
Open another window
- New empty window: ⌘⇧N, or File → New Window.
- Open a folder in a new window: from the terminal,
code -n path/to/project. Install thecodecommand first: command palette (⌘⇧P) → Shell Command: Install 'code' command in PATH. - Always open folders in a new window: set
window.openFoldersInNewWindowtoonin Settings.
Move one editor into its own window
Run View: Move Editor into New Window from the command palette (⌘⇧P). The file opens in a separate, lighter window you can put on another monitor or beside your browser. Copy Editor into New Window keeps it in both places.
This is handy for keeping a test file, a config file or docs visible while you work in the main window.
Switch between windows
| How | What it does |
|---|---|
| ⌘` | macOS: next window of the front app |
| ⌃W | VS Code's Switch Window picker, listing every window by folder name |
| Window menu | Lists open VS Code windows at the bottom |
| ⌃R | Open Recent, to jump to a project whether or not it's open |
⌃W is the most useful when you have more than two windows, because it shows names rather than cycling blind.
Merge windows into tabs
On macOS, VS Code can use native window tabs: set window.nativeTabs to true and restart. Each project window becomes a tab in one window, like Safari tabs, and Window → Merge All Windows gathers them. It keeps the screen tidy at the cost of seeing only one project at a time.
Restore windows on launch
window.restoreWindows decides what comes back when you reopen VS Code: all, folders, one, preserve or none. all reopens every window you had.
Arranging them
VS Code windows are ordinary Mac windows, so everything in how to tile windows on a Mac applies: Fn⌃← and → on macOS 15 and later put two side by side.
The trouble starts at three or four windows, plus a browser and a terminal: they pile up, and ⌃W becomes a way of life. A scrolling window manager keeps them all visible. In Ribbon, each VS Code window, editor window and browser is its own column on a horizontal strip:
- Open a second project and it becomes a new column next to the first; neither shrinks.
- Give the main window two thirds with ⌃⌥R and a moved-out editor a third beside it.
- ⌃⌥← / → moves between windows of any app; ⌃⌥1–9 jumps by position.
- If you use native tabs, a tabbed window takes one column.
Try the strip in the live demo; Ribbon is $9.99 once. The web development layout guide shows a full editor-browser-DevTools setup.
FAQ
How do I open a new VS Code window on Mac?
⌘⇧N, or code -n from the terminal.
How do I switch between VS Code windows on Mac?
⌘` cycles them, and ⌃W opens a picker that lists them by name.
Can I open the same file in two VS Code windows?
Yes. Run View: Copy Editor into New Window from the command palette.