Reputation: 16052
How do you split a window/view in Eclipse IDE? I want to edit code while viewing the different code in the same file.
If there is a trick to open the same file twice, this might do, but I would rather just split the one current view instead of having two of the same which might get confusing.
Upvotes: 323
Views: 239377
Reputation: 1324258
This is possible with the menu items Window>Editor>Toggle Split Editor.
Current shortcut for splitting is:
- Ctrl + _ for split horizontally, and
- Ctrl + { for split vertically.
- Ctrl + Shift + - (accessing _) for split horizontally, and
- Ctrl + Shift + [ (accessing {) for split vertically.
MacOS - Qwerty US keyboard:
- ⌘ + Shift + - (accessing _) for split horizontally, and
- ⌘ + Shift + [ (accessing {) for split vertically.
On any other keyboard if a required key is unavailable (like { on a german Qwertz keyboard), the following generic approach may work:
- Alt + ASCII code + Ctrl then release Alt
Example: ASCII for '{' = 123, so press 'Alt', '1', '2', '3', 'Ctrl' and release 'Alt', effectively typing '{' while 'Ctrl' is pressed, to split vertically.
Example of vertical split:
PS:
Upvotes: 369
Reputation: 4311
On Mac OS, the key combination to toggle spit/unsplit for horizontal split is ⌘ ⇧ - ("cmd"+"shift"+"-"), whereas for vertical split, it is ⌘ ⇧ [ ("cmd"+"shift"+"[")
Upvotes: 1
Reputation: 5669
If you want to see two different files in same eclipse you can,
Right-click a tab -> Detach
Now you can see both files at the same time without opening new eclipse and you can drag and reatach to tabs again.
Upvotes: 2
Reputation: 39
Below are the steps to split
editor horizontally or vertically
go to:
Window -> Editor -> Toggle Split Editor (Horizontal)
to split editor horizontally or
Window -> Editor -> Toggle Split Editor (vertical)
to split editor vertically.
It will open two editors side by side or will pileup tow.
Upvotes: 3
Reputation: 339
I tried the above solutions in Eclipse Luna 4.4.1 but couldn't open two (or multiple editor windows for different files side by side).
Simplest Solution:
Happy Coding!
Upvotes: 22
Reputation: 393
Side by side editors in single Eclipse window.
ADT/Eclipse:Build: v22.3.0-887826
Upvotes: 20
Reputation: 116
Simply go to Window > New Window
This will open up a new window of the same Workspace in eclipse.
You can open up separate files in each Window.
Upvotes: 6
Reputation: 114
You might want to check an eclipse plugin called HandySplit
It allows to split an editor into two and move tabs from one editors stack to another with keyboard shortcuts only.
That works on Eclipse Juno or higher. For the previous Eclipse versions check this out
Upvotes: 6
Reputation: 814
If you right click on one of the tabs, one of the options should be New Editor (for me, it's at the bottom). Select that, and then drag the new tab onto the bottom scroll bar of the code editor, which will split the editor panel in two.
Upvotes: 36
Reputation: 16190
You can open a new editor from the Window menu.
This will give you your current editor once again.
Upvotes: 99