Working prototype of Eclipse split editor

The first working prototype of a working split editor is here. You can download it and play with it in Eclipse 3.4.

Basic functions like text cursor, current line highlight (these did not work in the first prototype), undo/redo, cut/copy/paste, status bar items (insert mode, line and column numbers) work fine and stay in sync when switching between the top and bottom half of the split editor.

There are also some known issues:

  • Ctrl+Left/Right/Home/End keyboard shortcuts always operate on the top part of the split editor, even if the cursor is (blinking) in the bottom half.
  • Navigating back and forth using the Alt-Left/Right keys browser-style does not remember the correct editor along with the location and doe not move between the top/bottom half of the editor. I actually have no plans of fixing this. This problem also occurs when opening multiple editor tabs.

Here are some images that demonstrate how to open and use the split editor.

First select the Open With dialog…
Split Editor 1

Then select the [Split Text Editor] option…

Split the Editor by clicking and dragging on the narrow line that runs all the way across above the first line.

And there you go… long live the split editor!

You can try different commands out and see if they work when you move between the two sides (top and bottom) of the editor…

That’s it for now. Enjoy!

Bonus The plugin now includes source code so you can see the kind of monster that lurks in the background to make editor splitting work.

Up Next Next up is a java code splitter, after I resolve the remaining known issues with basic editing functionality. I will also put up an update site for faster/easier delivery of future updates.

6 thoughts on “Working prototype of Eclipse split editor”

  1. Nice work!
    Would it be possible to split a file vertically?
    And to link the scrollbars, i.e. that the first editor ends at e.g. line 120 and the second one begins at 121 and they scroll together? That would be very cool so that you don’t waste so much screen real estate at the right hand side of your screen.

  2. Thomas,

    It would be possible to implement vertical splitting. I would like to first find out though what the most common use cases are. I will talk about this more in a future post.

    Linking the scrollbars is not impossible but would involve changes in the SWT APIs, which afaik do not have support for something like that at the moment. I can implement such SWT enhancements on win32 but then they have to be added on all the platforms that SWT supports, and this makes even a small change take a significant amount of time. I think it will be hard to get SWT enhancements, needed to add support for merging scrollbars and other things, done in any reasonable timeframe.

  3. Hi,
    Nice work.

    Is it possible to open multiple file within spiter in tab form
    .when i open some file it should open inside the existing spliter.


    1. Narayan,

      No, you can not have multiple files in the same tab.

      I think for multi-file editors, like those who have little tabs at the bottom containing different files, there might be a good use-case. This is out of the scope of this project, however.

Leave a Reply

Your email address will not be published. Required fields are marked *