# VS Code with multiple windows on a Mac

Source: https://ribbonformac.com/vs-code-multiple-windows-mac  
Updated: 2026-10-29

<kbd>⌘</kbd><kbd>⇧</kbd><kbd>N</kbd> 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 <b>View: Move Editor into New Window</b> from the command palette. Switch between windows with <kbd>⌘</kbd><kbd>`</kbd> or VS Code's own <b>Switch Window</b> picker.

## Open another window

- **New empty window:** <kbd>⌘</kbd><kbd>⇧</kbd><kbd>N</kbd>, or **File → New Window**.
- **Open a folder in a new window:** from the terminal, `code -n path/to/project`. Install the `code` command first: command palette (<kbd>⌘</kbd><kbd>⇧</kbd><kbd>P</kbd>) → **Shell Command: Install 'code' command in PATH**.
- **Always open folders in a new window:** set `window.openFoldersInNewWindow` to `on` in Settings.

## Move one editor into its own window

Run **View: Move Editor into New Window** from the command palette (<kbd>⌘</kbd><kbd>⇧</kbd><kbd>P</kbd>). 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 |
| --- | --- |
| <kbd>⌘</kbd><kbd>`</kbd> | macOS: next window of the front app |
| <kbd>⌃</kbd><kbd>W</kbd> | VS Code's **Switch Window** picker, listing every window by folder name |
| **Window** menu | Lists open VS Code windows at the bottom |
| <kbd>⌃</kbd><kbd>R</kbd> | **Open Recent**, to jump to a project whether or not it's open |

<kbd>⌃</kbd><kbd>W</kbd> 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](https://ribbonformac.com/how-to-tile-windows-on-mac) applies: <kbd>Fn</kbd><kbd>⌃</kbd><kbd>←</kbd> and <kbd>→</kbd> 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 <kbd>⌃</kbd><kbd>W</kbd> becomes a way of life. A scrolling window manager keeps them all visible. In [Ribbon](https://ribbonformac.com/), 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 <kbd>⌃</kbd><kbd>⌥</kbd><kbd>R</kbd> and a moved-out editor a third beside it.
- <kbd>⌃</kbd><kbd>⌥</kbd><kbd>←</kbd> / <kbd>→</kbd> moves between windows of any app; <kbd>⌃</kbd><kbd>⌥</kbd><kbd>1</kbd>–<kbd>9</kbd> jumps by position.
- If you use native tabs, a tabbed window takes one column.

[Try the strip in the live demo](https://ribbonformac.com/#demo); Ribbon is [$9.99 once](https://ribbonformac.com/#pricing). The [web development layout guide](https://ribbonformac.com/web-development-window-layout-mac) shows a full editor-browser-DevTools setup.

## FAQ

### How do I open a new VS Code window on Mac?

<kbd>⌘</kbd><kbd>⇧</kbd><kbd>N</kbd>, or `code -n` from the terminal.

### How do I switch between VS Code windows on Mac?

<kbd>⌘</kbd><kbd>`</kbd> cycles them, and <kbd>⌃</kbd><kbd>W</kbd> 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
- [Web development window layout](https://ribbonformac.com/web-development-window-layout-mac) — Editor, preview, DevTools and terminal: where each goes on a laptop and on a monitor.
- [Arrange terminal windows](https://ribbonformac.com/arrange-terminal-windows-mac) — Tabs, splits and windows in each terminal, and keeping many sessions visible at once.
- [Switch windows of the same app](https://ribbonformac.com/switch-between-windows-same-app-mac) — Command-backtick, App Exposé, the Dock menu, the Window menu and a window switcher.
- [Mac setup for developers](https://ribbonformac.com/mac-setup-for-developers) — Homebrew, terminal, editor, launcher, windows and the settings to change on day one.
- [Xcode and Simulator layout](https://ribbonformac.com/xcode-simulator-window-layout-mac) — Xcode panels and tabs, Simulator sizing, Previews, and a layout that fits a MacBook.
