Wednesday, October 12, 2011

Using Sublime Text 2 as ColdFusion Editor

I’ve tried a lot of different editors for writing my ColdFusion code, but never found one that really worked well for me until now. Now I think I’ve found the one that works best for me, Sublime Text 2.

In the past I’ve tried:

  • Coda by Panic = does a really good job with handling the auto-completion of quotes and parenthesis. Has tabs for multiple file editing and does CSS, has a web preview and a Terminal tab. It’s a Panic app, which has a tradition of working really well. However I started to run into these I’d really like, like code folding, easier code colouring and speed seemed to decrease with each release. Coda 2 is “in the works”, but no one really knows when it’ll show up.
  • CFEclipse = I like how extensible the Eclipse platform is, it’s much more of a Integrated Developer Environment (IDE) then Coda. With extensions like Subclipse (Subversion), eGit (GIT) and Mylyn, it can be a pretty sweet tool. However like any Eclipse based environment that I’ve used it suffers two serious problems that over-time frustrate me. It seems to get slower and slower, and the way that it auto-completes of quotes and parenthesis easliy gets confused.
  • ColdFusion Builder 2 = same as CFEclipse, except it costs money to run slow, and if I’m correct in what I’ve found, only runs in 32-bit mode and not 64-bit mode in Mac OS X.
  • TextMate = from what I’ve read this application is pretty “long in the tooth”, but it seems to have a good sized and very faithful following. There is a ColdFusion bundle available. It’s very fast, you can define projects to see all of the code in your directories and has tabs. It works very well with the auto-completes of quotes and parenthesis. TextMate charges for a license, which I paid, but I just had a hard time getting into how to use it and didn’t find much in the way of documentation or screencasts that explained it well to me.

Sublime Text 2

I’ve been using a beta copy of the Sublime Text 2 editor for the Mac and really like it so far. Some of the key things I like about it after a week are:

  • It’s fast
  • Auto-completes the use of quotes and parenthesis correctly.
  • Good code syntax colouring, that can be modified, although I’m using the “Merbivore Soft” theme by Indynagpal.
  • Can open a folder so I can see multiple files at once
  • For file contents that are taller then the screen, a “code overview” of sorts displays on the right to quickly jump to another locatio in the file.
  • Code-folding
  • Tabbed interface for files, and interestingly when you click on a file it will show the contents but not open it as a tab unless you start to edit the file or double-click on it, great for a “quick peek” of the contents!

As I work with Sublime Text 2 more, and as it evolves from it’s beta form, I’ll post more on how I’m using it and what I find benefical.

5 comments:

Rick said...

Hi, Troy...

I've been writing ColdFusion for many years now and I, too, am not satisfied with CFEclipse or ColdFusion Builder.

I've been trying every editor I could find, and just recently stumbled on Sublime Text (Using the 2nd Version).

I wonder if you know if there is any support for ColdFusion since your wrote this blog?

Thanks!

Rick

Troy said...

Sure have Rick. Checkout this extension to add Coldfusion support

http://github.com/indynagpal

atomi said...

Indy's ColdFusion support is provided by a mirror of the old TextMate bundle. Check out this package with script-based cfc support, goto symbol support and more. https://github.com/SublimeText/ColdFusion

Gary Corcoran said...

With the release of Coda2 have you have a chance to take a look, initially I was impressed but it actually seems very buggy now for ColdFusion (crashing for me when it tries to do certain syntax highlighting)

Troy said...

Gary, I used Coda 1 in the past as my CFML editor of choice and really liked it. However since switching to Sublime Text and all of it's additional capabilities I haven't had a need, or desire, to look elsewhere. I really like Panic products, but I'm so happy with ST2 that I staying with it.