Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA shortcut for switching to tab by number

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?

like image 544
hwiechers Avatar asked Jul 30 '10 05:07

hwiechers


People also ask

How do I switch between tabs in IntelliJ?

Switch between tabs To move between tabs, press Alt+Right or Alt+Left . You can also switch between recently viewed tabs or files. In the editor, press Ctrl+Tab . Keep pressing Ctrl for the Switcher window to stay open.

How do I switch to a specific tab?

Switch to a Specific Tab On Windows and Linux, pressing Ctrl followed by the tab number will take you to the specified tab. For instance, Ctrl + 1 will open the first tab (from the left) while Ctrl + 5 will take you straight to the fifth tab. You can do this up to Ctrl + 8—which opens the 8th tab.

What is Ctrl Shift O in IntelliJ?

In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package.


2 Answers

There is no such feature in IDEA, however you can use Alt + Arrows and Ctrl + E (Recent Files) to navigate between tabs.

Other handy actions from the Go To menu:

  • Back / Forward (Ctrl + Alt + /)

  • Last Edit Location (Ctrl + Shift + Backspace)


Another option is to use the GoToTabs third-party plug-in:

The plugin adds menu actions allowing you to go to a specific tab. You can of course assign keyboard shortcuts the individual actions and for example achieve the behavior known from other editors/IDEs where you can switch between tabs with alt+num.

like image 80
CrazyCoder Avatar answered Sep 28 '22 05:09

CrazyCoder


The IDE itself still doesn't support it but I've created a plugin (GoToTabs) that will add "Go to tab #" actions you can assign keyboard shortcuts to (e.g. ctrl+1).

like image 40
Jiří Pospíšil Avatar answered Sep 28 '22 05:09

Jiří Pospíšil