Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 829
Arne Evertsson Avatar asked Dec 04 '09 12:12

Arne Evertsson


People also ask

How do I open the same file twice in Eclipse?

To get the same editor side by side, select Window > New Editor and then drag the new editor next to the original one.

How do I split view in Visual Studio?

Click within the editor window to give it focus. From the Window menu, select Split.

How do I close all open files in IntelliJ?

Go to Settings by ctrl+Alt+S. Go to keymap where you can search (close all) and add your desire shortcut key for it.


2 Answers

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

like image 110
MotohawkSF Avatar answered Sep 28 '22 02:09

MotohawkSF


IntelliJ IDEA 15

3 approaches

  1. Right click on the file tab > Split Vertically / Split Horizontally

    Split Vertically

  2. Being in the file that you want to split, press Ctrl + Shift + A > type "Split Vertically" / "Split Horizontally" > Enter

    Action Split Vertically

  3. Being in the file that you want to split, Window > Editor Tabs > Split Vertically / Split Horizontally

    Window Editor Tabs Split

like image 27
ROMANIA_engineer Avatar answered Sep 28 '22 02:09

ROMANIA_engineer