How I migrated my snippets from TextExpander to Keyboard Maestro | Dafacto

The personal website of Matt Henderson.

How I migrated my snippets from TextExpander to Keyboard Maestro

11 April 2016

TextExpander is a Mac utility for creating auto-expanding text shortcuts—“snippets”—that can save you time on things you repetitively type, such as email signatures, your telephone number or boilerplate responses to support emails. With version 6, Smile decided to move away from paid upgrades, to a subscription plan that would cost roughly $5 per month. The move was controversial, a situation which is well documented at Michael Tsai’s blog. I’ve been using TextExpander for 10 years, but decided against continuing with a subscription plan.

Another utility I’ve been using for 10 years is Keyboard Maestro, which as a general automation toolkit can do auto-expanding text shortcuts, and a whole lot more! Over the years, I’d often thought about the overlap between TextExpander and Keyboard Maestro, but had never taken the time to consolidate their use into one, until now. Last week, I finally migrated all snippets to Keyboard Maestro, and after 10 years with the product, removed TextExpander from my Mac.

Unfortunately, I wasn’t able find an automatic migration/import solution, but moving the snippets by hand turned out to take much less time than I anticipated. Here’s how I did it, and it involves creating a disabled snippets set in TextExpander called, “Migrated”:

Here’s the process I followed:

  1. I created the set “Migrated”, and disabled it, as shown above. (Actually, I created an additional one, “Not Migrated”.)
  2. In Keyboard Maestro, I created a “TextExpander” folder, to hold all the snippets I migrated.
  3. I created the first snippet in Keyboard Maestro, defining the action first (before the trigger) and using, “Insert Text by Pasting”. I’ve read that “Insert Text by Typing” is more compatible, but it’s slower and so I initially created all my snippets as “Insert Text by Pasting”, and I’ll change any that I later discover are used in environments where typing would work better.
  4. I typed the shortcut as a means of creating it rapidly it in Keyboard Maestro’s action field, since it was still active in TextExpander.
  5. I then switched into TextExpander and dragged the snippet to the “Migrated” folder, thereby disabling it.
  6. I then switched back into Keyboard Maestro, and specified the trigger. (Had I not moved the snippet in TextExpander to the disabled Migrated folder, then it would have auto-expanded into the trigger field in Keyboard Maestro!)
  7. To create the remaining snippets in Keyboard Maestro, I duplicated the first in Keyboard Maestro (so I wouldn’t have to manually specify the insert action or the trigger), and followed the above steps 4 through 6.
  8. I discovered that nearly half of the snippets I’ve created over the years are no longer used. Instead of migrating them, I just moved them to the disabled “Not Migrated” folder I created.

Here’s what a typical snippet looks like in Keyboard Maestro:

There were a couple of syntax differences to be aware of. Here’s how certain things work in Keyboard Maestro:

  1. My long-date timestamp: %ICUDateTime%yyyy-MM-dd-mm-ss%
  2. A Markdown link, which inserts the URL on the clipboard and then positions the cursor for typing: ![%|%](%CurrentClipboard%)

I was also happy to find that the AppleScript used in the TextExpander factory snippet for shortening URLs worked without modification in Keyboard Maestro, as well as a perl script I use for creating 12 character random sequences.

All in all, the migration took about 45 minutes, and as a result I’m running one less app on my computer.

Enjoy this article? — You can find similar content via the category and tag links below.

Questions or comments? — Feel free to email me using the contact form below, or reach out on Twitter.