intellij-idea

How to create two editor panes for the same file?


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?


Solution

  • 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