DEV Community

Yann Bertrand
Yann Bertrand

Posted on

ctrl + tab everywhere

When using the ctrl + tab shortcut, the default browser setting is to switch tab to the next one in order.

I like it a lot but it's not default in other tools I use a lot as a developer.

Using ctrl + tab in Visual Studio Code

In VSCode we'll have to tweak the keyboard shortcuts preferences. I prefer to edit them in JSON by typing ⌘ cmd + ⇧ shift + p, Preferences: Open Keyboard Shortcuts (JSON) and then adding:

        "key": "ctrl+tab",
        "command": "workbench.action.nextEditorInGroup"
        "key": "ctrl+shift+tab",
        "command": "workbench.action.previousEditorInGroup"
Enter fullscreen mode Exit fullscreen mode

This will allow us to navigate through grouped tabs with our browser shortcuts.

Using ctrl + tab in iTerm2

(First never forget to use the Natural Text Editing key mapping preset. I don't understand why it's not default)

To handle ctrl + tab correctly, you'll have to tweak the "Keys" tab and replace the key bindings we're looking for to switch to Previous Tab/Next Tab.

Tada we're done with it! 🎉

Top comments (0)