Pages

Thursday, October 20, 2011

*Updated* Screencast: Power ColdFusion Editing With Sublime Text 2

Previously I screencasted about using  E TextEditor for ColdFusion coding and at the time I was trying to determine a winner between that and Sublime Text 2.  The more time I spent in Sublime and the more I learned how to use its features it became the clear winner.  Coding in Sublime is fun.

If you don't have SublimeText 2 yet I suggest you download and install the latest dev build from: http://www.sublimetext.com/dev.  The dev build will give you updates every few days.  After Sublime is installed you'll need to download the and install the ColdFusion Bundle and Snippets.  I use Andy Jarrett's CFTextMate bundles at: http://cftextmate.andyjarrett.co.uk/, but there are other options.  Indy Nagpal's ColdFusion SubLime Text 2 project looks to be another good one: https://github.com/indynagpal/coldfusion-sublime-text-2.  The install process is quite easy, just copy the bundles into a folder in your "Packages" directory.  On a windows machine this directory is located at %AppData%/Sublime Text2/Packages.

Let me show you a few reasons why I love this editor so much.
**Note: Justin Carter brought to my attention that I was using auto-complete all wrong in this video. It works great if you type a few characters then do ctrl+space. For instance in a cfscript block type in arr+ sublime will give you a list of matching functions. Once you hit enter it will fill out the rest of the function for you with its arguments.**

Unable to display content. Adobe Flash is required.

Now lets take a quick look at creating your own snippets.

Unable to display content. Adobe Flash is required.

Other Resources

Charlie Griefer has a good post about Sublime over on his blog at:  http://charlie.griefer.com/blog/2011/10/19/sublime-text-2/

Nettuts has a great tutorial on "Sublime Tips and Tricks" at http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/

Lastly the narvenblog has a good list of favorite Sublime Text 2 shortcuts: http://www.narvenblog.com/2011/09/20/sublime-text-2-shortcuts/