Eclipse: have the same file open in two editors?

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.


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.


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


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.

Tags:

Eclipse