Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: have the same file open in two editors?

Tags:

eclipse

People also ask

How to open 2 files side by side in Eclipse?

Click on the tab of one of the files you want to edit and drag the tab to the edge of the editor frame until you see a vertical line appear in the middle of the editor frame. Then drop the tab there and you have two files to view side-by-side.

What can you do in the Eclipse split editor?

Split editor with basic functionality (undo/redo, cut/copy/paste, cursor line highlight, action contributions to menu/toolbar/statusbar) working correctly.

How do I open multiple windows in Eclipse?

To open multiple Eclipse windows using the same workspace, select Window→ New Window. It's a good idea to use this technique if you want to work in two different perspectives (such as the Java and Debug perspectives) at the same time in different windows.

How do I open the same file twice in Windows 10?

First, open the application you want to run in multiple instances. Then, hold down the Shift key on your keyboard and click with your cursor - or tap with your finger - on its taskbar icon. One click or tap opens a new instance, two clicks or taps open two, and so on.


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.


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.


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.


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.


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.


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)