One of my favorite Mac programs is TextExpander. I use it to expand shortcuts into full words and phrases, correct common misspellings, fill custom signatures in email, and even do cool tricks like pasting text by typing an abbreviation. It’s an incredible tool that pays me back every time I use it by increasing my productivity and cutting down on mistakes.

Speaking of mistakes, one problem I seem to have over and over again is typing duplicate words (e.g. has has). I think my fingers just move too fast. It drives me nuts finding duplicate words in blog posts, emails, and anything I blast out to the world.

It occurred to me recently that I could create a special snippet group in TextExpander specifically to deal with this problem. Fortunately, Wikipedia had already published a nice list of common word repetitions. (How did we ever live without Wikipedia, right?)

The Wikipedia list is by no means comprehensive, but it's a great start. I was able to import most of what I needed by creating a text file in the following format:

a a     a
an an   an

Basically, the first two words represent the TextExpander abbreviation, and the third word is what I want to end up with. A tab separates the abbreviation and final result.

After importing, I had to do some manual cleanup.  I found that I needed to have a space after each abbreviation.  For example, I don't want "on one sunny day" to turn into "on sunny day"  So it's important to distinguish between "on on" and "on on ".

I also set each snippet to adapt to the case of the abbreviation.  So if I try to start a sentence like "On on" it will get corrected to "On".

I'm so bad at this, it even came in handy while I was writing this post!

If you use TextExpander and want to add this as a group, just do the following:

  1. Download the group file that I created here and unzip on your Mac
  2. Open TextExpander
  3. Go to File > Add new group from file
  4. Select the DuplicateWords.textexpander file and click Open

Feel free to share your own TextExpander tips and tricks.