Eclipse: have the same file open in two editors?

Eclipse

Eclipse Problem Overview


When I'm editing a large file, I often want to have it open in two editing windows at once (eg. for reference, or because I'm working on two different parts of the file at once).

Is there any way to do this with Eclipse?

Eclipse Solutions


Solution 1 - Eclipse

Open your file and then Window->New Editor (Note: in newer versions it will be called New Window)

Then, click on its tab and drag it somewhere else to have two editors of the same file

Update: as mentioned by moschlar, From version 4.4, two editors can be created with Window -> Editor -> Clone.

Solution 2 - Eclipse

In Eclipse Luna (4.4) and above, this is supported out of the box: Window -> Editor -> Clone.

Solution 3 - Eclipse

I realize he specified a new editing window. Showing an alternative for those, like me, that do not want a new editor but would like to be able to look at the file in two places at the same time in the same tab.

Window -> Editor -> Toggle Split Editor will split the editor horizontally or vertically.
Ctrl + _ is horizontal and Ctrl + { is vertical. More precisely it's Ctrl + Shift + - and Ctrl + Shift + [.

I had issues with it in Mars (see note below) that seem to have cleared up in Neon.

Mars Note: The split editor seems a bit buggy. The JavaScript editor likes to jump the cursor to the other pane momentarily when it does a while-you-type-validation.

Solution 4 - Eclipse

Right click on your editor tab and select "New Editor".

... unless you have a newer version of eclipse, in which case do Window -> New Editor.

Solution 5 - Eclipse

Window -> Editor -> Clone is also available in Neon 2 and, judging from the other comments seems to be available in all newer Eclipses.

It's my preferred solution.

Solution 6 - Eclipse

In Eclipse Mars there is another way of doing it:

Window -> Editor -> Clone.

then drag the cloned tab to the corner to create a parallel window.

Solution 7 - Eclipse

In order to keep answers up to date i underline that with Eclipse STS this action is performed using window -> Editor -> Toggle split editor (horizental) | Toggle split editor (vertical)

Solution 8 - Eclipse

This seems to now be in the File-> New View Into File which opens the tab with focus into a new tab in the same group where you can then drag it to another group if you wish.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDavid WoleverView Question on Stackoverflow
Solution 1 - EclipseYuppieNetworkingView Answer on Stackoverflow
Solution 2 - EclipsemoschlarView Answer on Stackoverflow
Solution 3 - EclipseKnyriView Answer on Stackoverflow
Solution 4 - EclipseSethView Answer on Stackoverflow
Solution 5 - EclipseRex the StrangeView Answer on Stackoverflow
Solution 6 - Eclipsewilliam.eyidiView Answer on Stackoverflow
Solution 7 - EclipsealveomasterView Answer on Stackoverflow
Solution 8 - EclipsecgtsView Answer on Stackoverflow