Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OS X: cycle between windows in visual studio code

I'm trying desperately to figure out how to cycle through windows in Visual studio code. In Finder, there is a menu item Cycle Through Windows which I use frequently. However, this seems to be a Finder option. So I looked through the global shortcuts (since the requirement is probably the same for many applications) and assigned the Move focus to next window to shift-cmd-F1. This works in Finder and Text Editor, but not in Visual Studio Code. I checked if the key binding is overridden in VSC but I don't think so.

Has anyone got this figured out and can help me?

edit: just found that this is a global shortcut under System Settings > Keyboard > Shortcuts > Move focus to the next window. Unfortunately, Visual Code doesn't use it.

like image 725
rweng Avatar asked May 22 '16 07:05

rweng


People also ask

How do I switch between windows in Visual Studio?

In the upper right corner of the editor, choose the Active Files button, and then select a file from the list to switch to. On the menu bar, choose Window > Windows.

How do I switch between Windows applications on a Mac?

You can also switch windows using your Command key. Try hitting Command + Tab — a pop-up will appear showing every app that currently has windows open on your computer. Press Tab to cycle through them, and release Command when you've highlighted the one you want to switch to.


Video Answer


2 Answers

I added the following shortcut to keybindings.json

{
    "key": "alt+tab",
    "command": "workbench.action.quickSwitchWindow"
}

workbench.action.quickSwitchWindow does exactly what I want and it has no default shortcut enabled (on a spanish keyboard at least).

like image 194
Desko27 Avatar answered Oct 10 '22 10:10

Desko27


So, finally found the solution: Though for some reason the system-wide shortcut for Move focus to next window does not work, there is another shortcut which does: shift+cmd+~ :)

Found it here: https://support.apple.com/en-us/HT201236

like image 51
rweng Avatar answered Oct 10 '22 08:10

rweng