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.

Edit: Please use https://github.com/SublimeText/ColdFusion for the community-developed package.

26 thoughts on “Using Sublime Text 2 with ColdFusion”

  1. 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’ ?

  2. 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.

  3. 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.

    https://github.com/justincarter/CFML-SublimeText

    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.

    1. 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.

  4. Hey Indy:

    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.

    Thanks!

    1. 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.

  5. where you do you drop the plugin in a windows installation? all I see is a Pristine Packages Folder under sublime text 2

  6. Hi-

    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.

        1. @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!

  7. Hi Indi

    IT looks like the plugin and install instructions links is missing, do you mind forwarding it to me

    Thanks

    Michek

  8. 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>

      1. 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?

  9. 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?

Leave a Reply to Miles Cancel reply

Your email address will not be published. Required fields are marked *