11

Say I have a Java class, and navigate to another method by CTRL + CLICK .. The new file opens, in a tab that is positioned to left of the current one. Why? It should open to the right.

Is this a bug? It goes against any other known ways of opening new tabs, like Chrome, Firefox, etc. Is it possible to alter this behaviour?

I would like it to open the tab either at the right side of the current tab, or at the end of the right side.

5
  • Mine opens to the right, too.
    – mana
    Commented Oct 10, 2012 at 8:59
  • Don't have that problem. Using IntelliJ 11.1.3 Ultimate.
    – maba
    Commented Oct 10, 2012 at 9:39
  • strange, but I just figured out why. it is a bug. On the settings -> "When closing an editor" I have enabled "Activate right neighbouring tab" ... it seems to affect opening tabs as well. try to change to right.. then tabs will start opening to the left... a bug right?
    – mjs
    Commented Oct 10, 2012 at 10:16
  • That depends on what setting you have for Tab limit. Maybe you are opening a new tab while another one is being closed due to Tab limit reached.
    – maba
    Commented Oct 10, 2012 at 10:39
  • No that is not it. Try for yourself.
    – mjs
    Commented Oct 10, 2012 at 10:55

3 Answers 3

12

If you want to open a new tab at the end of the right side, now IntelliJ IDEA (mine is version 2017.2.4) offers you the option.

Right click at the tab bar and select "Open New Tabs At The End" option.

Open New Tabs At The End option

2
  • 3
    Seems odd this option isn't included in the settings
    – duxx0r
    Commented Sep 10, 2018 at 4:39
  • 2
    @duxx0r It is now included the IntelliJ IDEA settings. Commented Nov 3, 2019 at 15:29
9

UPDATE (November 2019)

If you want new editor tabs to be opened at the end, the latest IntelliJ IDEA versions have the dedicated option "Open new tabs at the end" for that in the settings:

Settings > Editor > General > Editor Tabs

enter image description here

Screenshot taken from IntelliJ IDEA 2019.2.4 (Ultimate Edition)

0
3

This behavior is by design, otherwise if you follow the link in the editor and the new tab opens on the right, after closing this new tab you will be navigated to yet another editor tab on the right instead of returning to the tab from where you started.

This breaks the workflow when you navigate with opening a new tab and want to return back by closing the new tab. It was decided to open new tabs on the left when Activate right neighbouring tab option is enabled.

If you don't like this behavior or want to suggest a better solution, welcome to YouTrack.

9
  • 5
    I suggest you call it "open tabs on the right/left" instead of calling it "do this on close" .. I understand what you are saying, but open a chrome browser, go to google, searh CTRL + Click on links, and close them. It doesn't really break the workflow. The idea is that the tab disappears and in comes something to fill it. Much more intuitive. But I do think that rather than deciding this for us, you should just create another option. Open tabs to the right, close tabs and activate the left/right ...
    – mjs
    Commented Oct 10, 2012 at 13:50
  • ^ this comment should be YouTrack issue, but there is one related already: youtrack.jetbrains.com/issue/IDEA-89731.
    – CrazyCoder
    Commented Oct 10, 2012 at 14:01
  • Ok, thanks. I also added another one about tabs that should be relatively easy to add. Just allow us to edit the color of the active tab editor, and stop reorganizing.
    – mjs
    Commented Oct 10, 2012 at 14:33
  • This functionality does make sense. When a new tab opens, it should be in the opposite direction of your "activate on close" direction. Why? Because when you close tabs you opened by ctrl-clicking artifacts in the source, want to arrive at your original file. Commented Oct 25, 2012 at 15:08
  • 1
    @CrazyCoder I want to raise this once again. It makes tabs almost useless in Intellij. Also, please allow us to pin tabs that can not be closed. You often have a couple of groups, one with Java files, one with css, one with html and so on. Now, when you open new tabs, CTRL + click new tabs open, but when you want to close the irrelevant ones to get back, you can't. Your groups close down and you are often left in a very irritating state that keeps repeating itself. PLEASE, add this. It is very important! I will pay you!
    – mjs
    Commented Oct 8, 2014 at 17:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.