At our regular TidBITS staff meeting a week before Apple announced its third quarter financial results (see “TextExpander 4, and so I jokingly suggested I could probably create a boilerplate article using TextExpander’s powerful new fill-in capabilities. .,” 24 July 2012), we discussed how we were going to cover the earnings results conference call. Someone mentioned that our story from the previous quarter probably could be recycled with only minor changes, given how consistently profitable Apple had been of late. I was just finishing the revision to my “ ” book to bring it up to date with the newly released
Well, I didn’t create a boilerplate article (we do have journalistic integrity here at TidBITS), but I did create a boilerplate opening paragraph snippet so I could quickly slug in the appropriate numbers as they were read out. Creating the snippet took only a few minutes and it was a lot of fun to figure out how to craft a template paragraph that could suit either expected profits or surprising losses. When it came time for us to write the story, we did, in fact, begin it with a revised version of the paragraph produced by my snippet.
For those who are new to the party, let me explain some TextExpander basics. With TextExpander you create short (or not-so-short) chunks of text that TextExpander calls snippets. You associate each snippet you create with a short, unique string of text called an abbreviation. TextExpander then watches what you type on your Mac and replaces the abbreviations that you type with the contents of the associated snippet. For example, I never type the name “TextExpander” anymore; I type the abbreviation I created for it, “ttx,” and TextExpander automatically replaces it with the snippet containing the text “TextExpander.” It works much like the text substitution feature in OS X 10.8 Mountain Lion’s Language & Text preference pane, but with considerably more flexibility.
Much of the flexibility has to do with TextExpander macros. These are strings of text within a snippet, prefaced with a percent sign, that perform some special function. TextExpander has macros for positioning the cursor after a snippet has expanded, inserting the current date or a calculated date, and a number of others.
One set of macros is for fill-in items that you can enter at the time the snippet expands. Fill-ins in earlier versions of TextExpander provided simple fields to fill in, but TextExpander 4 offers several types of fill-in macros: not only text fields, but also pop-up menus, multi-line fields, and optional text passages. (There are some other changes and new features in TextExpander 4, but fill-in snippets are the marquee feature.)
When you create a snippet, you don’t have to type any macro code; TextExpander has menus that insert the macro code for you. But when you edit a snippet that contains macros, the macro code does appear like any other text, so a snippet with a lot of macros can look rather gnarly. In fact, with the addition of TextExpander 4’s multiple types of fill-in macros, such as those I used for the financial results article, a snippet can look, at first glance, highly chaotic. Smile Software, though, has made sure that such snippets are not only editable by code geeks but by mere mortals who prefer a more friendly method.
In TextExpander 4, the text editing pane in which you create your snippets may look like a simple text editor, but it isn’t: when you double-click the text of any fill-in macro in a snippet, a specialized editor for the fill-in appears. Changes you make in the editor change the macro text in the snippet, so you don’t end up with any code stains on your fingers.
Each fill-in macro can be assigned a name, too, to help you reduce typing when you fill the snippet in: if a named macro appears in several places in the snippet, you fill it in once in the fill-in window and the content appears in all the fill-ins with that same name. I used that feature in my financial results snippet: I had to choose “profit” from only the first pop-up menu in the snippet to have “profit” appear in the other pop-up menu fill-in items in the paragraph.
Of course, the financial results snippet is something I’m able to use only a few times a year, but I use fill-ins snippets far more often than that. For example, I have a snippet that generates the opening parts of TidBITS articles for me (title, blurb, and author) whenever I start a new article. I also have a fill-in snippet I use for a book I’m writing to create figure and illustration file names so they’re always formed the way my editors like them.
In TextExpander 4, fill-in snippets, which were already very handy, became an even more powerful tool, and one that is a pleasure to use. Sure, I may not be able to write the Great American Novel using TextExpander 4’s fill-in snippets alone, but maybe when TextExpander 5 is ready…