visual-studio-codekeyboard-shortcuts

Shortcut to switch between 2 VSCode windows when there are several VSCode windows opened


I'm using a Mac.

I have several VSCode windows opened.

I would like to switch between only 2 (last viewed) windows. Does anyone know what is the keyboard shortcut to do so?

I tried command + `, but it went through all the opened VSCode windows one by one. Similarly for option + tab.

I tried control + w, it went through all the opened VSCode window too unless you use up and down keys to select.

Could anyone help?


Solution

  • I have the following mapped to alt+tab, in keybindings.json:

    {
      "key": "alt+tab",
      "command": "workbench.action.quickOpenRecent",
      "when": "!inRecentFilesPicker"
    },
    {
      "key": "alt+tab",
      "command": "workbench.action.quickOpenNavigateNextInRecentFilesPicker",
      "when": "inQuickOpen && inRecentFilesPicker"
    },
    {
      "key": "shift+alt+tab",
      "command": "workbench.action.quickOpenNavigatePreviousInRecentFilesPicker",
      "when": "inQuickOpen && inRecentFilesPicker"
    }