Closures in ColdFusion: Structures/Collections

Railo 4 supports closures (a.k.a. anonymous functions) in ColdFusion.

I’ve been playing with the different ways of using them in the various apps I am building at Straker Translations.

Today there was a need to loop over the keys of a structure (a.k.a. associative arrays) and add the value of all the keys.

The usual idiom of regular ColdFusion code would be to use <cfloop> to go over all the keys and do the addition.

With Railo closures it is much simpler. Here is the code:

It is simple and elegant. Makes the code much more succinct and powerful.

Alfred, Search Railo Wiki Using Google Please

Looks like the Railo team have been slowly migrating documentation on the various tags across from the old wiki to Github wiki. If you are like me, and like to refer to documentation every now and then, it is a bit pain to search for a particular function or tag in the Github wiki.

Google and Alfred come to rescue.

Suppose you want to see documentation on the cfcontent tag, first you get Google to do the hard work for you by entring the following in the search bar of your browser:

As you can see you can specify the URL to search (which is the Railo Github wiki) and query as ‘cfcontent’.

As you want to search for different terms you can substitute ‘cfcontent’ with the name of the ColdFusion function/tag you want more information on.

But it soon gets a pain in the neck as you have manually hack the URL each time.

That is where Alfred comes in very handy.

Create a Custom Search (in Preferences > Web Search). Use the following URL, and test.{query}&

Give the keyword ‘railo’ or whatever suits your fancy.

Custom Railo Wiki Search

To make this even better, you can use use the “I’m Feeling Lucky” functionality of Google Search to directly take you to the first page of the search results. You can create another custom search in Alfred using the following URL.{query}&

Now, whenever you launch Alfred, and use the keyword ‘railo’ or whatever you set up, you can type the name of the ColdFusion tag/function after they keyword, and it will open up the search results from Railo Github wiki in your browser!

If you use another program like Alfred, the same URLs can be used in the format that suits those programs.

Sublimate – Open in Sublime Text 2

Subliminate - Open Files/Folders in Sublime Text 2 using Path FinderIntroducing Sublimate — a Mac-only application to open files/folders in Sublime Text 2 by selecting them in Path Finder.

Think of Sublimate as “Open in Sublime Text 2” command that works in Path Finder.

You can select a single folder or a single file, or multiple folders and/or multiple files. Sublimate handles them all by opening them in Sublime Text 2.


  • Download Sublimate or clone the Git repository (
  • Copy to a folder of you choice (e.g., /Applications)
  • Browse to the folder in Path Finder, and drag the Sublimate application to the Toolbar on top.
  • To open a folder/file in Sublime Text 2, select it in Path Finder and click the Sublimate button in the toolbar.

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:


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 for the community-developed package.