← All articles

How to switch between VS Code windows on Mac (one window per project)

Open a folder in VS Code and you get a window. Open a second project and you get a second window. By lunchtime there's an API, a frontend, a scratch repo and a config folder, all in identical dark rectangles, and Cmd-Tab gets you as far as "Code". If you want to switch between VS Code windows on a Mac without clicking through the Window menu, there are three built-in ways to do it — one of them already bound to a key most people have never pressed — plus a couple of settings that make the windows easier to tell apart. Everything below applies to Cursor and other VS Code forks too, since they share the same window model.

The short answer

You want to…HowNotes
Pick a VS Code window from a list⌃W (Switch Window…)Built in, shows each window's title
Step to the next VS Code window⌘ + `macOS's own shortcut, no list
Reopen a project that isn't open⌃R (Open Recent…)Opens in the current or a new window
Jump between VS Code and your browser, terminal, docsLet's Switch: ⌥⇥Most recent window first, free

Note it's Control-W, not Command-W. ⌘W closes the current editor tab, which is exactly the wrong thing to press by habit.

Switch Window: VS Code's own window picker (⌃W)

VS Code has a command called Switch Window…, and on macOS it ships bound to ⌃W. Press it and a small list drops down from the top of the editor with every open VS Code window, labelled by its title — which, by default, includes the folder or workspace name. The current window is marked, the next one is already highlighted, so ⌃W then ↵ hops straight across. Type a few letters to filter the list by name.

Two things worth knowing:

  • You can close windows from the same list. Hover a row and there's a close button — handy at the end of the day when six projects are open and you want to keep two.
  • If ⌃W does nothing, something else owns it. Open Keyboard Shortcuts (⌘K then ⌘S), search for switchWindow, and either remove the conflict or record a key you prefer. Vim-mode extensions and Emacs-style keymaps are the usual culprits, since ⌃W means something in both.

You'll also find it in the Command Palette (⇧⌘P, type "switch window") if you'd rather not learn another chord.

Cmd-backtick: the macOS way

⌘ + ` is the system shortcut for "next window of the app you're in", and it works in VS Code like anywhere else. It's the fastest move when you only have two projects open: tap it and you're in the other one.

With four or five windows it gets worse quickly. There's no list, no names, no preview — you tap, look, decide it's the wrong one, and tap again. And on non-US keyboard layouts the key next to the left Shift or above Tab isn't always the backtick, so the chord can live somewhere unexpected or need rebinding in System Settings → Keyboard → Keyboard Shortcuts.

Open Recent: for the project that isn't open yet (⌃R)

Switching is for windows that exist. When the project you want was closed yesterday, ⌃R opens Open Recent… — a filterable list of recent folders and workspaces. Pick one and it opens in the current window; hold ⌘ while confirming to open it in a new window instead. This is the honest replacement for keeping eight windows open "just in case": close what you're not using and bring it back in two keystrokes.

Make the windows easier to tell apart

Every switcher is only as good as the labels it shows. Two cheap fixes:

  • Put the project name first in the title. The window.title setting controls what VS Code calls each window. The default leads with the active file name, so two windows editing index.ts look alike. Something like ${rootName}${separator}${activeEditorShort} puts the folder or workspace name first, so it's the first thing you see in ⌃W, the Window menu, and any other switcher.
  • Colour each project. Setting titleBar.activeBackground under workbench.colorCustomizations in a project's .vscode/settings.json tints that window's title bar; the Peacock extension does the same from a colour picker. Red for production configs is a good habit.

Or merge them into tabs

If you'd rather have one window with a tab per project, turn on window.nativeTabs (Settings → search "native tabs"), restart VS Code, then choose Window → Merge All Windows. Each project becomes a native macOS tab, as covered in our guide to merging windows on a Mac. One catch: VS Code keeps ⌃⇥ for its own editor tabs, so to move between project tabs from the keyboard, bind a key to Show Next Window Tab in Keyboard Shortcuts. The bigger trade-off: you can't see two projects side by side any more. A multi-root workspace (File → Add Folder to Workspace) is the other route if the projects are related and you want one Explorer and one search across all of them.

The faster way: one switcher for every window, not just VS Code

The real friction usually isn't VS Code to VS Code. It's VS Code → the browser tab with the docs → the terminal → back to the same VS Code window you came from. Cmd-Tab can't do that last step — it switches apps, so "back to Code" lands on whichever Code window macOS chooses.

Let's Switch is a keyboard window switcher built for this. Hold ⌥⇥ and you get a live preview of every open window across apps and monitors, most recently used first, so one tap and release always takes you back to the window you just left — the right VS Code project, not just "Code". When you only care about VS Code, ⌥ + ` cycles just that app's windows in the same overlay, with previews instead of blind steps. Both are in the free version.

Let's Switch Pro adds an ⌥Space search palette: type a few letters and jump straight to any open window; press ⌥Space again and the same box launches apps. It's $9.99 once — no subscription, no account, up to 20 devices per key, no telemetry. Two honest caveats: it works within your current Space, so a project parked on another desktop won't show up, and it needs macOS 14 Sonoma or later. If you want a free, open-source alternative, AltTab is the established one.

⌃W Switch Window⌘`` ``Let's Switch
VS Code windowsYesYesYes
Other apps' windows tooNoNoYes
Shows a list or previewList of titlesNoLive previews
Most recent first—NoYes
PriceBuilt inBuilt inFree; Pro $9.99 once

If you also arrange those windows side by side — editor left, browser right — Let's Tile does that from the keyboard too.

Frequently asked questions

What is the shortcut to switch between VS Code windows on Mac? ⌃W opens VS Code's Switch Window list. ⌘ + ` steps to the next VS Code window without a list. Both are built in.

Why does Cmd-Tab not switch between my VS Code projects? Cmd-Tab switches applications, and every VS Code window belongs to the same app. Use ⌃W or ⌘ + ` inside VS Code, or a window switcher such as Let's Switch to reach a specific window from any app.

Can I open a VS Code project in a new window instead of replacing the current one? Yes. In Open Recent (⌃R), hold ⌘ when you pick the project. The window.openFoldersInNewWindow setting changes the default for folders opened from Finder or the File menu.

Does this work in Cursor? Cursor is built on VS Code, so the same commands and settings apply; check its Keyboard Shortcuts if a binding has been changed.