I usually have a vertical split with two editor panes next to each other. Is there a way to have the same file in both of these panes?
-
Do you intend to have both panels synchronized? i.e both panels show class A, when you change panel 1 to class B the view in panel 2 will also change to class B? It's possible currently (v9) to do it manually with a Go To Class in each panel. – Dan Midwood Dec 4 '09 at 12:17
-
Go To / Class will just focus on the already open tab that contains the file. – Arne Evertsson Dec 4 '09 at 12:25
-
Window > Editor Tabs > Split Vertically in IDEA 13.1.6 (thought to mention since it seems to have moved) – akauppi Nov 18 '14 at 15:05
Alt-Shift-Enter
In the 'Open File' or 'Go To Class' dialog, or Project view, press Alt-Shift-Enter
(instead of just Enter
) to have the selected file open in the current pane even if it's already open in another pane.
Shift-Enter
will open the file in a floating window.
Older versions of IntelliJ
In older versions of IntelliJ (maybe before IntelliJ 2016): this shortcut was just Shift-Enter
.
Newer versions of IntelliJ (2019.2)
Shift-Enter
-
14Not sure this answer is still accurate for IntelliJ 14. When I hit shift-enter it opens the file in a floating window. Maybe I have remapped this keystroke in my keymap...looking into it... – Michael Feb 27 '15 at 17:38
-
1In IntelliJ 2017.2.5, this opens the file in a floating window, like @Michael mentioned. I suspect the functionality has just changed over time. This still achieves what I was looking for with being able to open a second pane for the same file, though. – Mike Hill Oct 23 '17 at 15:14
-
2
IntelliJ IDEA 15
3 approaches
It's possible in IntelliJ 10. First, use "Window -> Split Vertically" like Mr Rothgiesser suggests; this will open the same file in two panes in your single window. But then, to get it in a separate window, click and drag the tab from the newly-created pane off the original window into its own space on the desktop (that sounds more complicated than it is--just drag the tab off the window).
The file is now open in both windows, synchronized just as Mr Midwood suggests.
Yes.If you have only one file open and then click "Window > Split Vertically", you get the same file on both sides. At least in IntelliJ IDEA 6.0.
-
Te same in 7.0.5. But it's not neccessary to have only one file open. The current shown tab will be shown in the new view. – Kai Huppmann Dec 4 '09 at 12:21
-
1That kind of works, almost. Since I already have a vertical split, I'd certainly prefer not to open a third pane. – Arne Evertsson Dec 4 '09 at 12:27
Press Shift-Ctrl-Enter if you use IdeaVim and want same file get opened in an active tab group.
I'm afraid it's not possible in the recent IDEA versions. Please vote for IDEA-34593 or watch this issue for progress to get a notification when the issue is resolved.
UPDATE: As the issue was fixed, it's possible since IDEA 10, see the reply from MattLeidholm.