Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigate tabs with CMD+NUMBER in VSCODE

I'm trying to figure out how to assign the CMD(ctrl on pc)+NUMBER behavior in CODE to navigate tabs. Like Chrome or many others...

Can't seem to find anything on the subject.

Would appreciate being pointed in the right direction.

Thanks!

like image 341
David Woocas Avatar asked Oct 20 '25 11:10

David Woocas


1 Answers

All keybindings in VS Code can be edited and configured the way you want. The command you want to rebind has the name workbench.action.openEditorAtIndex1 and goes until workbench.action.openEditorAtIndex9 for all the possible indexes you can jump to via keyboard.

  1. Open VS Keybindings (Preferences > Keyboard Shortcuts). This will open two side-by-side documents.
  2. Add a new { "key": "Cmd+1", "command": "workbench.action.openEditorAtIndex1" } entry
  3. Continue for all indexes you want
  4. Save the User Settings file.
like image 96
Benjamin Pasero Avatar answered Oct 23 '25 05:10

Benjamin Pasero