Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop tabs from re-ordering inside IntelliJ IDEA?

Every time I click on a certain tab inside IntelliJ IDEA it reorders all the tabs. I find this to be super-annoying as I learn the order of my tabs, and then it switches.

like image 422
Kamilski81 Avatar asked May 15 '12 14:05

Kamilski81


People also ask

How do I disable tabs in IntelliJ?

Press ⇧⌘A (macOS), or Ctrl+Shift+A (Windows/Linux), for the Find Actions dialog. From here you can search for Tab Placement, NBar and TBar to turn on or off the tabs, Navigation Bar and Toolbar windows.

How do I pin a tab in IntelliJ?

Pin or unpin a tab To pin or unpin an active tab, right-click it and select Pin Tab or Unpin Tab from the context menu. To close all tabs, but the pinned ones, right-click any tab and select Close All but Pinned.

How do I set tab space in IntelliJ?

In IntelliJ IDEA, to convert existing tabs to spaces or vice versa, use File → Edit → Convert Indents → To Spaces (or To Tabs). The Reformat code shortcut Ctrl + Alt + L will also do this, while applying other changes.

How do I view tabs and spaces in IntelliJ?

You can use Find Action with ⌘⇧A (macOS), or Ctrl+Shift+A (Windows/Linux), and then type in 'Show virtual space at the bottom of the file'.


1 Answers

This is really annoying and sad, because this issue is from 2009 and it's still unsolved. I tested multiple configurations and find a suitable solution.

For my workaround and a more intuitive behaviour go to Settings -> Editor Tabs

  • Placement: Right or Left (show tabs in single row should be checked & frozen)
  • check Show directory in editor tabs for non-unique filenames
  • change Tab limit to 20 or your desired value
  • check Close less frequently used files
  • check Activate most recently opend tab

Apply and close the window. Then go to the menu bar: Window -> Editor Tabs and uncheck Alphabetical Mode if checked. This change let you reorder your tabs by drag&drop and new tabs are appended after the active tab. This also annoying, because most editors append it to the end of a list.
Maybe you prefer the Alphabetical Mode but the sorting is not consistent, because only one directory (the closest one) of a file is evaluating for the sorting. The parent folder and parents parent, ... are ignored.

There is still an annoying behaviour, which is more annoying when you place the tab bar on top/bottom. When using right/left you have still the same problems, but you get more space and it don't start to annoy you so fast with a vertical list ;)

  • when using single row you are limited to scroll horizontal/vertical, you cannot scroll out of the active tab, you have to change the active tab to scroll further.
  • when using single row at the end of the tab is a icon which shows the disappeared tabs with a crazy order and it change the order when you activate another tab.

With top/bottom placement you get another annoying behaviour:

  • when you place the bar Top/Bottom and not using single row the order changes in most cases when you switching between tabs, this the most annoying behaviour for me.

tested on IntelliJ Cardea

like image 153
timaschew Avatar answered Oct 06 '22 00:10

timaschew