How to enable duplicate tabs in Eclipse? (i.e. duplicate windows) - eclipse

If there's one thing I miss about emacs it's having 4 windows of the same file open, each at a different location in that file, for super quick referencing. Is there a way to get Eclipse to present multiple tabs of the same file?

On the Window menu choose Editor, then Clone (since 4.4.x) or New Editor (earlier versions). You can then drag the title bar around to get side-by-side views.

Another way would be to split the code editor view twice
But this will only be possible with Eclipse Luna 4.4 M4, as detailed by Lars Vogel in "Split editor implemented in Eclipse M4 Luna", in Bug 8009:
The split editor functionality has been developed in Bug 378298, and will be available as of Eclipse Luna M4. The Note & Newsworthy of Eclipse Luna M4 will contain the announcement.
Current shortcut for splitting is:
Ctrl + _ for split horizontally, and
Ctrl + { for split vertically.
Depending on your keyboard layout:
Andrew adds in the comments that you can need Ctrl + Shift .
el-teedee mentions (also in the comments) that, when pressing CTRL+{ in my Javascript editor, it inserts ''.
To fix this, I need to press CTRL+ALTGR+{ (Linux Ubuntu French keyboard),

Yeah, just right-click on the editor tab you want, and select "New Editor". It'll create a new tab editing the same file. You can then drag this new tab to the left or right edge of the view to get them in a "split screen" state. It's really very flexible.

I figured it out. Right-click tab > New Editor.

Other answers explain how to open multiple editors or split editor. If we are talking about other tabs/views that are not editor, it depends on the implementation.
TLDR: search for pin toggle or create new view button/option in view!
History view, Search view and other pinnable tabs - have "Pin this XXX View" toggle:
If you pin it it will keep the content and new Search (or history show) will show in new history view.
History view also has "Reuse Compare Editor" option so compares can be opened in same or separate tabs:
Markers view has option "New Markers View":
This view can be named and you can set custom filter for each view.
Similar is "Terminal View" that has button to open new terminal view:
Some tabs do not have any option to be duplicated. Tested with Eclipse 2019-12 (4.14.0)

I faced similar problem, but not with the main edit tabs: I wanted to have duplicate tabs in additional view panel (exactly: two junit views to compare different test runs).
In my case the only possible way to achive such thing was creating separate window: Window > New Window and openning new view there.
p.s. I'm using eclipse kepler 4.3.1.

For eclipse kepler , you can try right-click > open-with > any other like text editor

select window menu, then editor option, then clone

Related

Is it possible to duplicate the view of the same source file in Eclipse?

I'm doing some manteinance to a .cpp file with eclipse and I need to compare two methods. It's very uncomfortable to jump ahead and back to check differences.
Is there a way to duplicate the view of the same source file, in order to compare them side by side?
Edit the file and use Window > New Editor to open a second editor on the file. Then drag the title tab of the second editor and Eclipse will show on outline of how it is going to arrange the two editors. You can arrange the two editors vertically or horizontally.
Update:
Eclipse 4.4 Luna (currently only available as Milestone builds) adds support for splitting the editor directly using Ctrl+_ and Ctrl+{.

How do you join back the split editor panes in eclipse

On Eclipse, with Window -> New Editor or by drag/drop method* I could have one more editor panes in my eclipse work area. Now how do I remove that extra pane when I do not need it anymore. All it allows me now is to minimize/maximize that editor extra pane. It just sticks around. Shouldn't there be a collapse or close extra editor panes (that is without me requiring to do Window->Reset Perspective!)
Ref: answers to another question: How do you split and unsplit a window/view in Eclipse IDE?
Right-click on a tab in the window you want to close and select "close all". This will close the split window (and close any tabs in that window that have not been dragged to another window).
HandySplit has a flatten action that you need and other capabilities that you might find useful.

In Eclipse, can I view the files I currently have open in a vertical stack instead of a horizontal one?

I would find it much easier if the tabs show which files are in the Editor were stacked vertically rather than horizontally. Stacked horizontally means that you run out of room to display file names very fast and makes switching between files time consuming.
Is there an option or a plugin to display the files vertically? (Similar to navigator, but for open files instead of project files) I can't seem to find one.
tabs can not be stacked vertically. However, CTRL+E (⌘+E on mac) might give you some relief.
Eclipse 3.8
CTRL+G brings up an Editors dialog as shown in this screen capture:
Eclipse 4.3
CTRL+E brings up the pop-up shown in this screen capture:
With ctrl+shift+e you can open an extra window that show you the open tabs vertically.
EditorViewer is very good
The project is dead, but it works fine with Eclipse 3.7. Just drop the .jar file in the dropins folder
http://sourceforge.net/projects/editorviewer/?source=dlp
Another command is CTRL+F6 not entirely like the other ones but great to switch between your two most recent tabs. And you also get a list of open tabs like the other examples.
you can always drag windows over each other to tile them vertically but if you see a ">>" at the end of the tabs clicking on it gives a file list which are open.
None that I know of, but there are some other tipps to make life a little easier:
1) Use Mylyn, which filters the Explorer-Views so only relevant files are shown there.
2) Have a look at "Extended VS Presentation" http://andrei.gmxhome.de/skins/index.html . This little plugin adds some useful features to reduce waste of screenspace. With it you can hide the file extension in editor tabs or limit the size of each tab and reduce the padding. Then you can remove the X and close tabs with a middle click. Each just a small saving, but they add up.
For newer versions of Eclipse, there is a plugin Open Editors which adds a view listing all open editors.
Finally a true relief!
https://sourceforge.net/projects/editorviewer/?source=dlp
Install dragging the "install" button from
https://marketplace.eclipse.org/content/vertical-tab-list
to show it
"window / show view / browsing / editors list"
On its internal menu I selected too: Sort by ext+name
Now I just need a way to hide the top tabs list and it will become perfect!

Eclipse: keyboard shortcut to move tabs around?

Is there any way to setup an Eclipse keyboard shortcut which will split the current editor vertically and put the current tab on one side? For example, turning this:
before http://img.skitch.com/20100118-1n5xeuywunri6b91nfjpgdxxne.png
Into:
after http://img.skitch.com/20100118-t2c7g3nctx3w8bth4hq1rpqp9k.png
Not directly with eclipse (3.4 or 3.5)
The closest plugin I have found which might enable what you are looking for is the Split file Editor
Ctrl+6
Usage: Open a file in Eclipse, then select Window -> New Split Editor from the main menu to open a split editor of the file.
(not exactly what you want but:)
Split editor opens in a new tab as opposed to appearing within the existing tab
(so while there may be 2 instances of the same file editor, you still have a situation with one file on one side, and the other files on the other tab group)

Eclipse: have the same file open in two editors?

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?
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 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)
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.
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.