Important shortcuts for Eclipse & CFEclipse
[UPDATED: Thursday, July 31, 2008 at 10:38:30 AM]
Two great posts by Mike Henke and John Whish over the past week cover some really important keyboard shortcuts for Eclipse & CFEclipse. They cover the gamut of some of my favorites (like CTRL+SHIFT+R) and some ones I always forget about (such as CTRL+DEL and CTRL+BACKSPACE.) These are definitely shortcuts you should be memorizing to make you work more efficient.
General Eclipse Shortcuts
- [CTRL]+[SHIFT]+[L]
- A list of all keyboard shortcuts (not mapped by default in CFEclipse--you can create a copy of this shortcut in the Keys preferences and map to [CTRL]+[ALT]+[K] which is open in CFEclipse.)
- [CTRL]+[K]
- Finds the next occurrence of the highlight text. (NOTE: This is one of the best ways to jump around your document.)
- [CTRL]+[SHIFT]+[K]
- Finds the previous occurrence of the highlight text.
- [CTRL]+[H]
- Brings up the Search & Replace dialog.
- [CTRL]+[D]
- Delete the current line.
- [CTRL]+[SHIFT]+[DEL]
- Deletes to the end of the current line.
- [CTRL]+[DEL]
- Deletes the next word.
- [CTRL]+[BACKSPACE]
- Deletes the previous word.
- [CTRL]+[SHIFT]+[X]
- Converts highlighted text to uppercase.
- [CTRL]+[SHIFT]+[Y]
- Converts highlighted text to lowercase. </DD
- [CTRL]+[Q]
- Goes to the last place you made a change.
- [ALT]+[LEFT]
- Goes "back" to the last open editor in your viewing history.
- [ALT]+[RIGHT]
- Goes "forward" to the next open editor in your viewing history.
- [CTRL]+[E]
- The Quick Switch Editor opens a list of all open editors and allows you to quickly switch to any open file.
- [CTRL]+[SHIFT]+[R]
- The Open Resource dialogs allows you to quickly open any files in your workspace. This is one I use all the time.
- [CTRL]+[3]
- The Quick Access menu pretty much helps you find anything in Eclipse by providing a keyword.
- [CTRL]+[SHIFT]+[E]
- The Switch to Editor brings up a list of all open editors (and can even span multiple windows.)
- [CTRL]+[UP]
- Moves the current (or higlighted) rows up one line.
- [CTRL]+[DOWN]
- Moves the current (or higlighted) rows down one line.
- [CTRL]+[ALT]+[UP]
- Inserts a copy of the currently highlighted line above the current line.
- [CTRL]+[ALT]+[DOWN]
- Inserts a copy of the currently highlighted line below the current line.
- [CTRL]+[ALT]+[RIGHT]
- Shifts (indents) the current or highlighted line(s) to the right. Much faster than highlighting the line(s) and using the [TAB] key.
- [CTRL]+[ALT]+[LEFT]
- Shifts (un-indents) the current or highlighted line(s) to the left. Much faster than highlighting the line(s) and using the [SHIFT]+[TAB] key.
- [CTRL]+[HOME]
- Jumps to the beginning of the current file.
- [CTRL]+[END]
- Jumps to the end of the current file.
CFEclipse Shortcuts
- [CTRL]+[3]
- Wraps text inside #...#.
- [CTRL]+[T]
- Edit current tag.
- [CTRL]+[SHIFT]+[A]
- Inserts <cfabort/> tag.
- [CTRL]+[SHIFT]+[D]
- Inserts <cfdump/> tag.
- [CTRL]+[SHIFT]+[O]
- Wraps text inside <cfoutput>...</cfoutput> tags.
- [CTRL]+[SHIFT]+[N]
- When focus is inside of an HTML/CFML tag, it will jump to the matching open or close tag.
- [CTRL]+[SHIFT]+[U]
- Converts highlighted text to uppercase. (NOTE: I recommend using [CTRL]+[SHIFT]+[X] instead because it's a general Eclipse shortcut.)
- [CTRL]+[SHIFT]+[L]
- Converts highlighted text to lowercase. (NOTE: I recommend using [CTRL]+[SHIFT]+[Y] instead because it's a general Eclipse shortcut.)
- [CTRL]+[SHIFT]+[P]
- Wraps text inside <p>...</p> tags.
- [CTRL]+[SHIFT]+[C]
- Wraps text inside a contextual comment (i.e. <!--...--> for HTML, /*...*/ for scripts).
- [CTRL]+[SHIFT]+[M]
- Wraps text inside <!---...---> tags.
- [CTRL]+[SHIFT]+[Z]
- Opens the color picker.
- [CTRL]+[\]
- Expands or collapses the current code block (<cfif>, <cffunction>, <cfswitch>, etc.)
In CFEclipse, most of your standard shortcuts for formatting (i.e. [CTRL]+[B] = strong) work as well. Learning keyboard shortcuts can really speed up your development process, so I recommend trying to learn one or two a week and introduce them into your coding habits.

Comments
[CTRL]+[\] - collapses or expands the current code block (within cffunction, cfif, cfswitch, etc)
ctrl+shift+k: does a *backward* "find next" within document on whatever's currently highlighted
ctrl+alt+up: repeats the line that's currently highlighted
ctrl+home: jumps to beginning of doc
ctrl+end: jumps to end of doc
ctrl+H: file search & replace dialog
I'm on Eclipse 3.3.1 (not sure if that makes a difference). Also, in my Help menu there's a Key Assist item that gives you more all shortcuts available. :)
btw - if you can, update your blog software to accept emails with plus signs - see http://cfzen.instantspot.com/blog/2008/04/30/Does-...
I can't believe I left off [CTRL]+[K] and [CTRL]+[SHIFT]+[K]. I use those two shortcuts more than any others.
I've updated the list with some of the other suggestions.
Great list btw
Thanks for the info. I've updated the list to specify the comments are contextual. I wasn't aware that they were.
Abhijeet
Quite frankly, the most important one is: [CTRL]+[SHIFT]+[L] (which you need to make a copy of to work in CFEclipse.) That brings up the "Show Key Assist" pop-up which shows you ever keyboard shortcut currently available to you. While this list can be quite cumbersome, it's great to have at your finger tips and a great way to "remember" those keyboard shortcuts you keep forgetting.
FYI - Abhijeet is a comment spammer. His posts are just enough on topic to look legit, but he is a SEO slimeball.
Thanks for the heads up. I've removed his link.
[CTRL]+[UP] - moves current line or selected lines up one line
[CTRL]+[DOWN] - moves current line or selected lines down one line
I use them in conjunction with Ctrl-Alt-Up / Down all the time. Note that adding the Alt modifier copies either the current line or selected lines (automatically expands to full lines if partial selected).
Thanks for the correction. You are correct and I've updated the list.
I just wonder if there is any (CF) Eclpise plug-in is available to have the design view of a html/cfm page?..
Regards,
Dav R
You can only use one "editor" at a time in Eclipse. So even if you find an HTML designer editor for Eclipse, you wouldn't be able to use it and CFEclipse at the same time.
As for whether a design editor exists, I really don't know (I've never looked for one.) You might check MyEclipse--it might have something. I don't really like WYSIWYG. I code faster by hand.