emish
emish

Reputation: 2853

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

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?

Upvotes: 44

Views: 22092

Answers (8)

Piro
Piro

Reputation: 1435

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 pin toggle or create new view button/option in view!

History view, Search view and other pinnable tabs - have "Pin this XXX View" toggle: Search view with pin button

History view with pin button 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: Reuse compare editor option in History view

Markers view has option "New Markers View": Markers view options 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: Terminal view button for new terminal

Some tabs do not have any option to be duplicated. Tested with Eclipse 2019-12 (4.14.0)

Upvotes: 1

Gan
Gan

Reputation: 11

select window menu, then editor option, then clone

Upvotes: 0

VonC
VonC

Reputation: 1324278

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),

https://bugs.eclipse.org/bugs/attachment.cgi?id=238285

Upvotes: 13

sktguha
sktguha

Reputation: 564

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

Upvotes: 0

Uriah Carpenter
Uriah Carpenter

Reputation: 6726

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.

Upvotes: 92

arghtype
arghtype

Reputation: 4534

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.

Upvotes: 0

emish
emish

Reputation: 2853

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

Upvotes: 1

Adrian Petrescu
Adrian Petrescu

Reputation: 17979

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.

Upvotes: 5

Related Questions