Monday, June 7, 2010

Split Code View in Eclipse


I just learned about a feature in Eclipse that I was missing from my Homesite+ days.

Some background
For me, Eclipse easily replaces Homesite+ for Coldfusion editing because it has good color coding, auto-formatting and intellisense for CF, HTML, CSS, JavaScript, jQuery and MANY other languages.
Sometimes all of the above languages are, unfortunately, all in the same file and Eclipse is just fine and helpful with this--although, sometimes the color coding gets a little confused on what's going on and reminds me to take every opportunity to refactor old, ugly code.
I use the Aptana (non-pro version) plugin for front-end code support (HTML, CSS, JavaScript, jQuery etc.) and CFEclipse for Coldfusion.
When I'm ready to get off my bum and code in a real OO language, Eclipse also supports (and, I believe, originally was made for) Java Development.

OK, get on with it already
Sometimes I edit very long CF files and would like to copy or migrate code from one part of the file to another.
Sometimes the length of the file makes it difficult to do this carefully and accurately. Enter split code editing.

In this video, I right-click the tab for the file I'm editing and select "New Editor." You can also select the tab you want to split-edit and go to the Window menu to select "New Editor"
You can edit and save in either tab.
Each tab tracks changes in the other.
I haven't tested whether each tab tracks "unsaved" changes in the other.
Switching between recent tabs via the keyboard is control+F6 (hold down to select from context menu or quick-release to go to most recent "other" tab.

No comments:

Post a Comment