Situation
For example, there are two open Editor tab groups:
Group A:
-
File 1(Active tab)
Group B:
-
File 2(Inactive tab) -
File 3(Active tab)
Also, File 1 is linked to File 2 (e.g. it uses a class from File 2).
With default settings, when Cmd+Click is performed on the class name in the code of File 1, Group B now switches to File 2. Group A remains on File 1.
This is different from the default behavior of other IDEs, which would open File 2 in a new tab in Group A (and also keep it open in its inactive tab in Group B).
Question
Is there a setting that controls this behavior, i.e. that defines that linked files always open in the current Editor Tab Group?
Answer
Yes, there is a setting that controls this behavior in IntelliJ IDEA. It is called "When navigating to a file, prefer selecting existing tab in inactive split pane".
It is enabled by default in the Advanced settings of the IDE. In case you start seeing a different behavior, make sure it wasn't disabled accidentally:
See also
- The description of other Advanced Editor Settings: https://www.jetbrains.com/help/idea/advanced-settings.html#advanced_editor_tabs
- How to open the same file in the current Editor if it was already opened in a separate window: How to open the same file in the current Editor if it was already opened in a separate window
Comments
0 comments
Please sign in to leave a comment.