VS Code with multiple windows on a Mac

Updated · by , maker of Ribbon

⌘⇧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

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

HowWhat it does
⌘`macOS: next window of the front app
⌃WVS Code's Switch Window picker, listing every window by folder name
Window menuLists open VS Code windows at the bottom
⌃ROpen 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:

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.

Keep reading