Search code examples
visual-studio-codekeyboard-shortcutsvscode-keybinding

Is there a VS Code shortcut to open active file in another tab?


All I've been able to find is cmd + K O, which opens the active file in another window. Searching for a keyboard shortcut to open the active file in a new tab in a split window.

I want to start with one tab open with index.js, and end up with two tabs, each with index.js, ideally in a split window.


Solution

  • The keybinding command IDs you are looking for are the ones that start with the prefix workbench.action.splitEditor. You can open your keyboard settings file with the Preferences: Open Keyboard Shortcuts (JSON) command, or open the keyboard shortcut editor GUI with the Preferences: Open Keyboard Shortcuts command.

    To learn more about how to customize keybindings, see https://code.visualstudio.com/docs/getstarted/keybindings.