IntelliJ IDEA shortcut for switching to tab by number

Viewed 18996

In FireFox, I'm constantly using the Ctrl + 1-9 shortcut to switch tabs. Basically Ctrl + 1 will take me to the first tab, Ctrl + 2 will take me to the second one and so on.

Is there an equivalent for this shortcut in IntelliJ IDEA?

13 Answers

Since this is one of the first hits when Googling this, note that as of IntelliJ IDEA 2018.3 EAP this is now possible. From the feature request tracker:

In upcoming 2018.3 EAPs you're welcome to assign shortcuts you need for new actions in the group 'Other', see a screenshot. With these actions you can select tab1..tab9 and also the last tab.

To accomplish this:

  1. Go to Keymap in Preferences
  2. Search for "select tab"
  3. Individually assign Command+<number> to each of the tab numbers mappings

Screenshot of tab keymapper

You can use this short cut on mac Shift + Command + { or }

cmd+shift+[ - go to previous tab
cmd+shift+] - go to next tab

If you are using IntelliJ's IdeaVim plugin, the vim style shortcut works as well:

  1. gt, go to next tab
  2. gT, go to the previous tab
  3. 1gt, go to the first tab
  4. 2gt, go to the second tab
  5. 3gt, ....

If a tab has a number with an underline like this example, you can use Alt + 9 to switch to it. But not all tabs have a underlined number.

MacOS:

  • Next tab: + + ]
  • Previous tab: + + [

if you use ideavim, you can use num+gt to go to the specific tab. for example, 2gt lead you to the second tab.

Keymap -> Other -> Tabs. Then setup what you want

Related