Home

Save Typing in Mac OS X with Customizable Text Substitutions

Synopsis:

There are probably phrases that you find yourself typing over and over again. Learn how to have Mac OS X automatically fill these in for you using customized abbreviations.

Let's Begin:

If you work on any kind of documents, there are probably some key phrases that you have to type repeatedly. These could be things like your company name, a product name or other types of proper nouns or just frequently used words or phrases. For example, I tend to use the phrase “For example, ” quite frequently at the beginning of sentences when writing these articles. Wouldn’t it be nice to save a few keystrokes and let Mac OS X fill this phrase in for me by just having me type an abbreviation like “fe” instead. Turns out that as of SnowLeopard, this is really easy to do, though it isn’t a very well publicized feature so few people take advantage of it. You used to need third party software like TextExpander or TypeIt4Me to do this, but Apple built this feature into Mac OS when they created SnowLeopard. Text substitution works in most text based applications that ship with Mac OS X and many third party apps as well, but it doesn’t work everywhere (we’ll talk more about this below). So let’s learn how to do customized text substitution as we type.

Set it in System Preferences

All you have to do is to decide what phrases you want Mac OS to fill in for you and then pick an abbreviation to trigger the substitution. Then you just enter the combination in the Language & Text section in the System Preferences. When you go this section, you’ll see a tab for “Text” that looks like this:

screen shot showing the Language & Text system preferences pane under the text tab

The “Symbol and Text Substitution” table on the left is what we’ll be working with. It’s quite simple: the “Replace” column shows the abbreviation that will trigger the substitution and the “With” column is what the abbreviation will be replaced with. As you can see, Mac OS X comes with a few substitutions already programmed in, and you can add as many more as you want by clicking the “+” button at the bottom of the table.

Setting Up Automatic Text Replacement

Let’s say you’re George Jetson and you find yourself typing your company name “Spacely Space Sprockets Incorporated” frequently throughout the day and you want to shorten this by just typing “ss” instead. Just do the following:

Step 1: Bring up the Text substitution pane in the Language & Text System Preferences shown above.

Step 2: Click the “+” button at the bottom to add a new substitution to the list.

Step 3: In the “Replace” column type “ss” and in the “With” column type “Spacely Space Sprockets Incorporated”. You can use the tab to move from the Replace field to the With field instead of the mouse if you want. Press Enter/Return when you’re done typing the “With” text. Then make sure the checkbox in the first column is checked (it will be by default). And if you want a carriage return to in the replacement text itself, then use option-return to add that.

It should look like this when you’re done:

screen shot showing newly added substitutions to the text substitution pane in the system preferences

Next, substitutions need to be enabled in the app you’re using. Text replacement is generally off by default in apps, probably to avoid unexpected replacements.  There are generally two ways to enable replacements:

1. Right-click to bring up the contextual menu and selection Substitutions > Text Replacement. If there’s a check mark next to this entry, then replacement is on.

screen shot of context menu showing where text substitutions can be enabled
2. In some apps, the Substitutions > Text Replacement setting is found in the Edit menu instead of the contextual menu and looks like this:

screen shot showing the edit menu in the text edit app and where text substitution can be enabled

Now any time you type the abbreviation “ss” it will be replaced with “Spacely Space Sprockets Incorporated” and it will save you quite a bit of typing. Abbreviations are parsed by Mac OS as individual words, so replacement occurs as soon as you type a space after the abbreviation or type a punctuation character like a period or comma.

Picking Good Abbreviations

There are a few things you need to consider when picking what your abbreviations will be:

  1. First off, Mac OS looks at individual words when deciding what to replace. In the example above, only the word “ss” will be replace when it appears by itself, not when it’s part of another word. So the replacement will not occur when you type the word “miss”.
  2. Because it matches abbreviations against the words you type, your abbreviations can’t be any words that you would normally use. So using the word “space” as the abbreviation for the example above wouldn’t be a good idea.
  3. It’s best to stick with abbreviations that are acronyms for the phrase you’re replacing them with.  These are easier to remember and unlikely to match other words you’re going to be using.

What Apps Work with Text Substitutions

Fortunately, most of the standard apps that ship with Mac OS X support text substitution. These include TextEdit, Mail, Safari, iChat among others.

The iWork application suit is a bit of an odd case. The three iWork apps, Pages, Keynote and Numbers support text substitution but they don’t use the settings in the System Preferences. Instead the apps have their own set of substitutions in the application’s Preferences > Auto Correction pane. This is no doubt due to the fact that Apple released iWork ’09 prior to SnowLeopard. I imagine these apps will be updated to use the System Preferences in the future.

Not all third party apps support text replacement. Most notable among these is Firefox which many Mac owners use. This may be due to the fact that the Firefox developers want to have a single binary that runs on both Leopard and Snow Leopard, and so they probably want to stick to the least common denominator feature set to make it easier. Perhaps in the future Firefox will add support for automatic text replacement.

So there you have it. Easy text replacement of abbreviations in Mac OS X that is entirely customizable just by going to one pane in the System Preferences. It’s simple to set up and simple to change as you need.

Category: Apple Mac OS X