The FileMaker Ninja's Toolbelt: TextMate Bundle
Welcome to the first installment of The FileMaker Ninja's Toolbelt, an occasional series on various tools and techniques for taking your development in FileMaker to the next level.
Beyond the Calculation Dialog
The calculation dialog in FileMaker Pro is great for many things. It provides easy access to all of your fields, operators and functions. The Data Viewer in FileMaker Pro Advanced even shows you the calculation results.
Here's a screenshot of a custom function being defined in FileMaker Pro's native dialog:

But sometimes this can be cumbersome. The calculation dialog doesn't help format your functions and can be difficult to scroll through. Those of you who work in text editors know what I'm talking about. Text editors commonly provide users with a host of powerful features: syntax highlighting, code folding, easy indendation, code snippets, find and replace (even with regular expressions), and so on. That's why I develop my custom functions in a text editor whenever I can.
A Text Editor that supports FileMaker Pro?
The problem is that there aren't any text editors that support FileMaker calculations. Or are there? Those of you who already use TextMate might be a step ahead here. TextMate is a very popular text editor for Mac OS X. Best of all, you can easily teach it how to work with FileMaker calculations by installing a FileMaker "bundle" (similar to a plug-in).
There has been at least one bundle available that supports FileMaker. Charles Ross posted one to Google Code back in 2009. At some point Jonathan Stark added some snippets. Matt Petrowsky later posted a trimmed-down version of that to github. Those versions provided some helpful features:
- Syntax highlighting
- Code snippets
- Command for viewing function documentation
Very useful! I forked a copy of Matt Petrowsky's bundle back in March of 2010. I found it so useful that I have been gradually adding to it ever since. Here's a list of the current features:
- Tab triggers for FileMaker functions
- Documentation for functions, script steps and error codes
-
Commands
- Manipulating/generating calculations
- Manipulating/generating FileMaker clipboard XML
- Extracting data from the DDR
- Extracting data from import.log files
-
Syntax highlighting
- FileMaker
- FileMaker Clipboard
- FileMaker Log
- FileMaker Hash (Generated using #( ) custom function from six.fried.rice)
- Code folding
- Help section
This is what it could look like when working with the same custom function, but in TextMate!

Much more readable, isn't it? You can even change and customize the theme of this window to your exact color preferences. But that's just the start.
You can see it in action by watching this video: TextMate Bundle for FileMaker 01: Basics
Getting It For Yourself
Interested yet? Pretty powerful stuff! The bundle is available to anyone. All you need is a copy of TextMate and to download the files. TextMate even offers a free 30-day trial. You can download the current files and view installation instructions here.
Alternatively, you can just download a recent copy of the bundle below. Just extract the filemaker.tmbundle package from the .zip file and double-click on it. TextMate will take care of the rest!
TextMate_Bundle_for_FileMaker_2012.01.09.zip
Have you tried this bundle or something similar? Let me know on github or in the comments here. I'd love to make this an even richer community effort and resource!
- Donovan
This is good for that I work very difficult to edit these calculations in FileMaker Pro! I develop the Ruby On Rails where TextMate is the text editor that we prefer for most of development .
Thank you Mr. Donovan!
The Textmate Syntax highlighting ( asked dev to include recently ) now in Codebox code snippets app. http://www.shpakovski.com/codebox/
Thanks for sharing.
@Gemi you’re welcome. Feel free to send me any code from the bundle that you decide to add or refine. The Ruby is a little rough still!
@Olly Groves you’re welcome. Thanks for the heads up. Interesting app!
This text editing feature should be built into FileMaker Advanced. That’s all I have to say.
I wish something like this was available for BBEdit.
Thanks, Donovan. This is a handy tool.
A nice companion tool is QuickCursor (http://www.hogbaysoftware.com/products/quickcursor).
@Daniel What sort of things are you doing with QuickCursor? I’d probably use an OS level utility for most snippets if I was really dependent on them. I’ve heard praise for Hal Gumbert’s FMSnippets package for TextExpander.
I’m a TextExpander guy myself. But I only use it for custom function headers, timestamping script notes and for storing complex script parameters.
Very nice - might finally tempt me to switch from BBEdit to TextMate.
quick note: latest rev of codebox app (link above) has TextExpander function built in. Works great system wide inc in FMpro
Just updated the bundle download! Added a command or two and smoothed out some rough edges.
Is it worth asking about a FM-function-syntax-highlighting text editor on the Windows platform?
@fmc, There are other text editors with similar features and feel, but the only one I’ve heard of that supports actual TextMate bundles like this one is E Text Editor. I haven’t tried it myself, so I’d love to hear if anyone has tried it.
I downloaded the trial of TextMake and also the filemaker bundle, which is now installed correctly. But I haven’t figured out how to have the filemaker custom formatting applied automatically to text that I’m editing. It just appears as regular text. Any advice is appreciated.
@Tom, I have two screencasts recorded on how to format calculations in the bundle. There’s recently been some updates to that feature. I’m hoping to get the videos posted on Monday or Tuesday and will follow up with a link.
In the meantime, it sounds to me like you’re working in a document whose language is set to “Plain Text”. You can see the language designation in the bottom of the window. Select that and change it to “FileMaker”.
An easier way to do it is to use this service to pull the text into a new TextMate document for you. It will set the language to “FileMaker” for you.
Thanks for the quick reply! Setting the language to Filemaker was exactly what I was missing.