By default, Ctrl+Tab in Visual Studio Code cycles through tabs in order of most recently used. This is confusing because it depends on hidden state.
Web browsers cycle through tabs in visible order. This is much more intuitive.
To achieve this in Visual Studio Code, you have to edit keybindings.json
. Use the Command Palette with CTRL+SHIFT+P, enter "Preferences: Open Keyboard Shortcuts (JSON)", and hit Enter.
Then add to the end of the file:
[
// ...
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
},
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditor"
}
]
Alternatively, to only cycle through tabs of the current window/split view, you can use:
[
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditorInGroup"
},
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditorInGroup"
}
]
Alternatively, you can use Ctrl+PageDown (Windows) or Cmd+Option+Right (Mac).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…