The idea behind TextExpander is simple: it substitutes something you type (usually something short) with something else (usually longer and more complicated) in almost any situation where you can enter text. Although I’ll present a simple example in this chapter, TextExpander substitutions, called snippets, can be complex and extraordinarily helpful: they can include formatted text, images, the current date or time, fields where you fill in information on the fly, the clipboard contents, and more. They can even move the insertion point and run scripts.
But first, some basics. In this chapter, I tell you how to:
After that, you’ll be ready for the next chapter, where you meet the many kinds of snippets you can create, and master how to use them.
It should come as no surprise that you’ll get the most value from this book if you have a copy of TextExpander installed on your Mac. You can obtain Smile’s TextExpander from the company’s site.
You can also purchase a Family Pack or Office Pack license from Smile should you need to install TextExpander on multiple machines that are used by more than one person; you can find details about the Family Pack and Office Pack in the TextExpander FAQ.
If you just want to try TextExpander, you can obtain a free trial version from Smile’s site.
Installation is nearly effortless: When you obtain TextExpander from Smile by downloading the trial version, you just unzip the downloaded file (if your Mac doesn’t do so automatically) and drag the application to your Applications folder. When you launch it, you may see a dialog asking you to give TextExpander permission to access your Contacts. This permission makes it a little easier when you use the Snippet Creation Assistant, described just ahead, but is not mandatory: you can click OK or Don’t Allow, as you prefer.
Next you see both the TextExpander app’s main window and the Welcome to TextExpander window, as well as the Purchase/Registration window (Figure 1).
To use TextExpander in trial mode, click Try the Demo in the Purchase/Registration window.
Or, to purchase a license, click an appropriate link in this window. (If you’ve already closed it, launch the trial version of TextExpander so the TextExpander window is showing and then choose TextExpander > Purchase/Register TextExpander.) After you complete the shopping process in the cart, the registration code automatically appears in the window; click the Register button to complete your purchase.
You can also purchase a registration code through your Web browser. Smile emails you a registration code after you complete the purchase; enter the code by choosing TextExpander > Purchase/Register TextExpander.
So, if you don’t have TextExpander, go and get a copy. I’ll wait.
As I mentioned in the previous topic, the very first time that you launch TextExpander, you see several windows. One of them is the main TextExpander window, perhaps showing the registration window if you haven’t yet registered it, as seen just previously in Figure 1.
If you see the registration window and don’t want to buy or register TextExpander right now, just click Try the Demo. However, keep the TextExpander window open, since you want to watch it change as you work with another of those windows: the Welcome to TextExpander window.
For first time users, the Welcome to TextExpander window shows the first page of the Snippet Creation Assistant, as in Figure 2.
Although you can close the Snippet Creation Assistant window immediately and dive right into using TextExpander, I strongly recommend you run through the Assistant if you haven’t already set up your core set of TextExpander snippets—it can save you a lot of time.
The Snippet Creation Assistant helps you create a basic set of snippets and add pre-supplied groups of snippets to your snippet collection. The Assistant also provides pointers and tips for using these snippets, and offers you the opportunity to try some of them out to see how they work in practice.
Here are the kinds of snippets you create or add with the Snippet Creation Assistant:
When space is at a premium, being able to use a short URL like http://tinyurl.com/oorug23 instead of http://www.pixel-stained-wretch.com/wordpress/2015/06/13/crichton-and-me/ is very handy.
And now, with your copy of TextExpander stocked with some snippets and snippet groups, it’s time to learn some basic facts about the TextExpander interface and to create your first snippet from scratch.
Unlike most apps, TextExpander has two faces: the first is a traditional Mac interface, complete with an application window and standard menus on the menu bar; the second is a single TextExpander system-wide menu on the right side of the menu bar. You may be wondering, why does TextExpander have these two different faces?
When it comes to utility applications that work behind the scenes assisting other applications, the standard Mac interface of every application having its own windows and menus can get in the way of the utility doing its job. It’s like that with TextExpander, which is all about working behind the scenes, replacing one chunk of typed text (known as the abbreviation) with another (the snippet) and allowing you to create new abbreviations and snippets quickly, all while you keep working.
The first thing that a new TextExpander user has to figure out is when to use which TextExpander interface. Although every person has an individual working style, I’ve found that these general guidelines makes sense:
This menu appears when you click the small TextExpander icon that TextExpander places among the other system-wide menus on the right side of the menu bar. I call this the “TextExpander quick-access menu.” (To learn about creating and editing snippets with this menu, as well as how to assign and use TextExpander hotkeys, refer to Create Snippets as You Go, later in the book.)
But enough (for now) of theoretical musings about the interface. The best way to use TextExpander is to use TextExpander! The following sections describe the process for creating and using TextExpander snippets. If it looks complicated, don’t panic: although I’ve laid it out in detail so you can study the process, in normal use you can create snippets in a matter of seconds, and use them as fast as you can type their abbreviations.
The first thing you need to do is to create the text snippet that you want TextExpander to insert whenever you type the abbreviation that stands for the snippet. This text can consist of a word or two, or even a much lengthier passage.
Although TextExpander provides numerous ways to create a snippet, we’ll use TextExpander’s old-fashioned, traditional window interface for this run-through:
A new entry appears in whichever group of snippets is selected in the left of the window, and your cursor is placed in the snippet creation area at the window’s right. (Don’t worry for now about snippet groups; I describe how to manage them later, in Organize Your Snippets.)
You can, if you prefer, copy the text from elsewhere and paste it in the snippet Content field; for example, I’ve copied and pasted a typical letter salutation from the mid-15th century “Paston Letters” in the snippet Content field in Figure 5.
And that’s all you need to do to create the snippet. However, it is not really usable at this point. Read on to learn about assigning three important attributes to a snippet: the abbreviation you type to insert it (required), a case-sensitivity setting for the abbreviation, and a label in case you can’t recall the abbreviation.
For every snippet you create, you need a unique abbreviation. You need an abbreviation because, without one, there would be no way for TextExpander to insert the snippet into your text. You need a unique abbreviation because TextExpander replaces that abbreviation with the actual snippet whenever you type it: if the abbreviation weren’t unique, TextExpander would not know which snippet to substitute when you typed an abbreviation assigned to two or more snippets! Fortunately, TextExpander warns you, by highlighting the abbreviation in orange, when you try to assign an abbreviation used by another snippet.
Here are some other guidelines for snippet abbreviations:
As shipped, TextExpander’s default case-sensitivity setting for abbreviations is to make them case sensitive, although you can change that on a (ahem) case-by-case basis; you can also change the default case-sensitivity setting in TextExpander’s Expansion preferences (note that changing the default does not change the case-sensitivity settings of snippets that have already been created).
Here are your case-sensitivity options:
Now that you know what makes a good abbreviation and how case sensitivity works, the act of creating an abbreviation is anticlimactic:
While abbreviations need to be short (so they’re easy to type), unique (so they don’t conflict), and unusual (so you don’t type them by accident), labels need to be informative: a label is what you call a snippet, so when you’re looking for the snippet (and, if you have a lot of them, sooner or later you will) you can tell from its label what it contains.
For short snippets, the label can be the snippet content itself. This sort of label is so common it’s the default: if you don’t give a snippet a label, its contents become the label. You can assign a custom label, however, by typing one in the Label field of the TextExpander window. The label appears not only in the Label field but also in the Groups list at the left, which lists your snippets groups and the snippets that each group contains (see Organize Your Snippets).
You can see examples of TextExpander labels in Figure 5, a few pages back: all the labels shown in the My Snippets group, except for the snippet currently being created, are custom labels.
Using a snippet is, as it should be, simplicity itself. If TextExpander is running (you can set it to run on login; see Manage Your Interfaces), you can type a snippet’s abbreviation in almost any program that accepts text input. As if by magic, TextExpander expands the abbreviation to the content that it represents.
It’s so easy, you may not even notice when it happens.
A snippet, as you’ve seen, is what TextExpander serves up whenever you type a snippet’s abbreviation. But plain text is only one of the types of snippet content. You can choose what kind of content a snippet can have from the pop-up menu above the TextExpander window’s snippet Content field, as shown in Figure 6.
The following is a brief rundown of the content types:
When TextExpander replaces the abbreviation, the snippet appears as you formatted it in TextExpander, along with its graphical objects, if any. You can find out more in Add Formatting and Pictures, next chapter.
You can also write snippets in Apple’s JavaScript for Automation, designed for automating OS X apps; this kind of JavaScript snippet works only in TextExpander on the Mac, not in iOS. See Script with Snippets for more about JavaScript snippets.
52.15.135.175