Amcom Home Page

 Split Screen View in Eclipse

Most IDEs offer what's known as a "split screen" view. In such a view, while editing a single file, you can horizontally "split" the page in the editor and scroll each section individually. This is useful when you've got a particularly long file to edit, and you need to see some code at the top of the page while editing code at the bottom (or really, editing any part of the page that might depend on another part that would have otherwise scrolled off of the page).

A co-worker is trying to make the change from his current IDE to Eclipse and recently asked whether or not this functionality is there. The answer is yes. Kind of. It's not a "true" split screen view, but here's how to get as close to it as is currently possible within Eclipse.

Notice that the file in question (based on the scroll bar) is a particularly long file. I believe this one has close to 2,000 lines (yes, I know):

Right-click on the tab at the top of the editor window and choose 'New Editor' fron the context menu:

You'll notice that a 2nd editor window for the same file is now open.

Left-click the 2nd editor window, hold, and drag it towards the bottom of the page. You'll notice that as you get to the bottom, an outline will appear. Release the mouse button:

The second editor window is now in place below the first. Notice that the top window is displaying the top of the file, and on the second (bottom) window, I've scrolled to the bottom of the file:

It's important to understand that this is not a true split view. This is not a single view of a single file being split. This is two distinct editor windows with the same file open. This means if you make changes in both editor windows, saving one will effectively stomp the changes in the other. While utilizing this "pseudo-split screen", make sure to modify only one of the 2 open editor windows.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Does anyone know why Eclipse doesn't have the split screen feature? This is the one thing I truly miss from Emacs. I used to split the screen all day long back then, before I converted to Eclipse.
# Posted By Frode | 2/23/09 4:05 AM
Hi Frode:

It turns out it's not so much a limitation of Eclipse, but rather a limitation of CFEclipse.

If you do the same split-screen view using, say, the WTP in JavaScript or CSS view, you'll see changes made in one editor window reflected in the other.

This was recently pointed out to me on the cfeclipse mailing list. Not sure if there's an enhancement request in for cfeclipse to add this behavior... but feel free to check the wiki :)
# Posted By Charlie Griefer | 2/27/09 3:04 PM

BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner