CFML developers using CFEclipse (and more recently ColdFusion Builder) have long enjoyed the benefits of Snippets and the Snip Tree View, a way to create customized, variable-driven chunks of code which you can drop into your source with a single keyboard combination. I wrote about them a long time ago, Matt Gifford recently wrote what has become the de facto guide to snippets, and lo many years back Mark Drew made this video which is still relevant today.
To add to the general awesomeness of snippets, you can share them amongst your computers or even other developers. This shows you how to do so with DropBox.
In my experience, once a developer becomes snippet-infected, they tend to bemoan their absence when editing other types of source code. Unfortunately, Snippet insertion never worked when editing other files like Flex, and even when it did work, you had to install the entire CFEclipse plugin which some developers don’t want to do. Until now.
Who’s the target audience?
*ColdFusion Builder snippets should already work with other sources! Good job, CFB team.
How do I install it?
The Eclipse Update Site is at http://cfeclipse.org/snippets/update/. In Eclipse 3.5 and later, you’d use “Help – Install New Software”. Then click the “Add” Button. Then add that URL into the URL field. Follow through to the end.
What will this install into my Eclipse?
This will install a standalone Snippet Tree View and corresponding key binding into Eclipse. By default, the key binding is “Ctrl-Shift-I”. Note that this will be different from the binding mentioned in the above articles, although you can reassign it to whichever key combination you like. In FlashBuilder, I immediately reassigned mine to the familiar Ctrl-J sequence.
Who’s responsible for bringing such Joy unto the world?
We’d be remiss if we didn’t thank the CFEclipse founding fathers. Rob Rohan and Spike Milligan will most likely never know that the work they did still continues to improve the lives of developers around the world. Mark Drew has led CFEclipse for years and many credit him with helping make it a mature, stable platform on which to build CFML applications. And Robert Blackburn added the SnipEx support into the Snippet Tree View. Thanks to all you wonderful people!
For this release -- separating Snippets into their own plugin and refactoring so that they’d be useful for other languages on the Eclipse platform -- Denny Valliant (github) gets all the credit. Denny’s one of those guys you don’t hear much about, but he’s brought inestimable joy into developer lives through all the work he’s done on CFEclipse and other projects. Thank you, Denny.
What to do next?
- Install the Snippets Plugin
- Read one or more of the links above explaining how to use snippets.
- Open up the Snippet Tree View and add some snippets (don’t forget the “trigger text”!)
- Go into your editor and type the trigger text for one of the snippets you added. Hit Ctrl-Shift-I to insert the snippet
- Repeat Steps 3 and 4 and rejoice in all the time this will save you