Of all CFEclipse's features, none save me as much time as "Snippets". Eclipse has a built-in snippets feature, but for my part, I think CFEclipse's implementation is superior.
You create snippets in the Snip Tree view. You give it a name, a "start block", and optional "end block", and a "trigger". In addition, you can use "variables" to have the snippet inserter prompt you for stuff. More on that later.
First, here's what the dialog looks like for creating/editing a snippet:
Trigger Text
For me, its killer timesaver is trigger text. I don’t have to open up the snip tree view, navigate through a tree of snippets, and click to insert. Just type the trigger text and hit Ctrl-J.
For example, I have a snippet for creating a new CFFUNCTION. In a cfc, I simply type: function and then hit Ctrl-J. Here's what my snippet looks like:
And here's the popup I get when I hit Ctrl-J
I assign triggers to all the snippets I use on a day to day basis. I do have a number of snippets I use rarely, but I keep them as snippets because I figure if I have to type it more than once, it’s worth being in a snippet. But since I rarely use them, I’d forget the snippet trigger anyway.
If you were to chop out the trigger functionality tomorrow, I could measure my productivity loss in hours over the course of a year. And I’m not a fan of losing hours.Variables
Variables are placeholders for text that you will be prompted to enter when you insert a snippet. For example, in that function snippet above, you saw this:
cffunction name="$${Function Name}" output="false" access="$${Access:public|private|package|remote}" returntype="$${Return Type:any|void|string|numeric|struct|array|query}" hint="$${Hint}"
And then when I inserted the snippet, it gave me a dialog where I'd populate those placeholders. If you don't enter anything, it just enters an empty string instead. Note also that you can create a dropdown list by using a pipe-delimited list, as in the "returntype" attribute above. Finally, if you use the same variable twice in a snippet, it will only prompt you for it once and then it will insert it in each place it was requested.
CFEclipse comes with several useful built-in variables you can use, too. They can be found at the official documentation site: http://trac.cfeclipse.org/cfeclipse/wiki/CFSnippets
You can watch Mark Drew’s video on using snippets here: http://cfeclipse.org/assets/movies/07_Snippetsfla.html
Finally, if you’re interested, here are some of the snippets I use every day. Many of these were created by my former colleague and all around good egg, Mike Rankin.
Bottom line: Next time you find yourself typing code that you've typed more than once, stop. Add it as a snippet, assign it trigger text, and execute the snippet by typing your trigger text then hitting Ctrl-J