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:
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.
Edit: Please use https://github.com/SublimeText/ColdFusion for the community-developed package.
26 thoughts on “Using Sublime Text 2 with ColdFusion”
aye. I’ve been using sublime on and off for a few days. It is quite nice.
Quick question though… Where the hell is the ‘Print’ ?
Good point! Perhaps you should post that on the mailing list!
A bit late but you can install the print package through package control.
I guess I should really start to follow you on gitHub. Seems like you read my mind and than decide to beat me to it. First with the dictionary now with this …
A lot can be done to improve the existing CF snippets, so there is a room to do a lot! Please feel free to fork and improve. Do let me know so that we can keep the repos in sync.
I’m just loving Sublime. It is exactly the kind of editor I’ve wanted, but never had.
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.
Hi… Never ran into that issue before. Possibly because I don’t normally use script-based cfcs.
I use the the key combo all the time and works ok on CFM and CFCs that use CF tags. It works correctly inside CFScript blocks.
I’ll have to play around and see what is going on.
If possible send some sample code via email to: indy at nagpals dot com OR add a GitHub issue.
Hi Indy: Thanks for the reply. Will try to put some code samples or maybe even a short video together to demonstrate the behavior. Thx!
where you do you drop the plugin in a windows installation? all I see is a Pristine Packages Folder under sublime text 2
In Windows 7 the folder is located at C:\Users\[username]\AppData\Roaming\Sublime Text 2\Packages
I assume it’s the same for Vista, not sure about XP.
I was wondering if you were going to address the issue of the color coding not working in script- based cfcs. I love working in sublime but this is the only remaining feature that I really need..
If there are no plans for this, perhaps someone could give pointers on how I might tackle this myself. I have no experience with Textmate bundles however.
Check out https://github.com/SublimeText/ColdFusion
This has more updates.
I cloned the project from git like it recommends and restarted Sublime, but I did not see a difference:
All white text as before… am I doing something wrong?
@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!
IT looks like the plugin and install instructions links is missing, do you mind forwarding it to me
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.
Will figure out what is going on and fix later on.
For now you can go to: https://github.com/indynagpal/coldfusion-sublime-text-2
The link you give just goes to a 404 page. Appears to be here: https://github.com/SublimeText/ColdFusion
Thanks for pointing that out. You are right.
The project has been moved as part of the SublimeText organization in GitHub. I’ll update the link above.
Thanks for this. 😀
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>
Use this: https://github.com/SublimeText/ColdFusion
It is a community developed package so much more up-to-date.
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?