Using Sublime Text 2 with ColdFusion

I’ve been using Sublime Text 2 over the past few days. Since it is fairly compatible with TextMate syntax and language files, I’ve ported the snippets from the ColdFusion TextMate bundle (CFTextMate) to Sublime Text 2. I’ve also added a bunch of snippets that I use myself and find handy.

The plugin and install instructions are available at:

https://github.com/indynagpal/coldfusion-sublime-text-2

In addition, I’ve also customized the Merbivore Soft color scheme that I use. So working with it feels as nice as the editor itself.

I added a ColdFusion Sublime Text package to github about a month ago 🙂 It’s an actual sublime-package file though (i.e. a zip file) as opposed to all the separate files, I just provided it as something that would work for those who wanted to easily try out Sublime Text. I haven’t done any work on it since the initial creation.

Have you done any work with the sublime-keymap files? I’ve got a few commands that mirror common keyboard shortcuts from CFEclipse. The main thing I’m still waiting for is an auto-completion API so that snippets can be used for the same type of attribute auto-completion that we get in CFEclipse / CFBuilder.

Hi Justin… Yes, a colleague who uses Windows saw it and told me about it. He was able to use that, but I didn’t quite know what do with it on a Mac. Now that I know it is just a zipped file, I’ll download and check it out.

Not I haven’t done much with keymaps except for customizing a few things for myself.

Auto-completion would be good… But for me what really rocks in Sublime is the ability to autocomplete based on snippets as well as symbols in the file… I find once I have my own snippets in place, all I’m using ctrl-space all the time to auto-complete. Works beautifully.

It’d be great to have attribute auto-completion going. But till then, I have my own snippets for things like and and so on. Doesn’t take much time create those, but one ends up saving a ton of time using them.

Just started using Sublime Text 2 and your ColdFusion package. Slick stuff so far. Thanks for the effort.

Ran into one issue tho… CMD+M is inserting HTML comments, not CFML comments. And in a script-based CFC, it’s always entering the HTML comment as opposed to //. Oddly enough, if the component is opened with a cfcomponent tag, it seems to be able to differentiate and uses // as appropriate (but still the HTML style comments for tags).

Never really poked around under the hood of TextMate bundles, so not sure this is something related to your Sublime Package or not. Would be happy to try and help fix it, but at the moment, don’t know where to even start looking.

If this is an issue with the package, I’m happy to open an issue on github, if that’d help. Just let me know.

@Scott I’ve pushed some updates within the past few days that should resolve most outstanding highlighting issues. I’ll be adding language function calls soon as well. Don’t hesitate to post issues, feature requests or just fork it.

@Indy, I added you to the developers group for the SublimeText org at Github. I think you will agree SublimeText org is a better home for the ColdFusion package. So, let me know if you have suggestions. Also, thanks for posting this. Enjoy! Cheers!

For some reason the blog software has decided to not show links and images! I’ve had to edit the entry in the meantime to actual add the link and show the image. Sorry it is not clickable at the moment.

Hi, this is really great, thank you!
I see two problems though. First of all cfelseif and cfelse tags are not coloured for some reason and also, when placing something like cfif var1 GT var2 inside an html tag like input, the whole cfif tag gets coloured like input’s tag attribute.
I mean something like <option value="#threshold#" selected>

Thanks, that solved the cfelseif/cfelse problem, but still the second problem remains. Maybe if html syntax colouring was applied first and then cf one would “overwrite” it, it would solve the problem.
Does anyone know if there is a quick (configuration) fix for this problem?

I’m using Sublimer with the coldfusion package, I moved from dreamweaver to sublimer, and I’m loving it. A quick question! Anyone know how to get standard html autocomplete when using Coldfusion Markup? Seems not to work for me! I installed SublimeCodeIntel but didn’t help I didn’t know what .tmLanguage syntax file to use or any other suggestions?