How to create Snippets in TextExpander

If you’re new to ​​TextExpander, you may be overwhelmed by all of the options you see when you create your first Snippet. In this thread, I’ll explain how to create your first Snippet and how to understand the more advanced features as you go. First, let’s talk about Snippet Groups.

Snippet Groups

Every Snippet must belong to a Snippet Group, which helps keep your Snippets organized. Think of it like a folder. Creating a new Snippet Group is easy:

  1. Click the New Snippet Group icon in the top left corner.
  2. Enter a name for your Group in the Name field.

You can ignore the rest of the options for now. Click the Snippet Group name in the sidebar to open that Snippet Group.

Make a Snippet

While viewing the Snippet Group you just created, click the big orange New Snippet button. Your cursor should be in the Snippet Editor by default. Here, you should type whatever you want your Snippet to expand to. In future posts, we’ll explore all the many options available here.

Next, click on the Abbreviation field. The Snippet’s abbreviation is what you type to expand it into whatever you have entered into the Snippet Editor.

The two things to keep in mind when creating Abbreviations is:

  • Keep them short enough to easily type.
  • Structure them so you won’t expand them accidentally.

One way to accomplish these goals is to place a special character at the start of an abbreviation, like so:

  • ;txp
  • .txp
  • /txp

Another way is to add a small mnemonic to the start of a Snippet, like:

  • mail.hello
  • Mail.sig
  • Mail.thanks

See: Tips for Organizing Your Snippet Library

Every individual and organization tends to settle on their own conventions. Experiment to figure out what works best for you and then be consistent in applying it.

Finally, you can set a Label for a Snippet. This is merely a name, and though it’s optional, it’s a helpful field to help you find the Snippet in search, especially Inline Search. Make it something descriptive and memorable!

That’s it, you’ve created your first Snippet! In future posts, we’ll teach you more of the finer points of creating Snippets.

Setting the Content Type

When creating a new Snippet, pay attention to the Content Type field. The default is Rich Text, which lets you apply formatting to your text.

You can also set the Content Type to Plain Text if you don’t want to add any formatting. See Rich Text vs. Plain Text: Understanding the Difference.

There are three more advanced options as well, which let you insert custom code into a Snippet:

  • Shell Script
  • AppleScript (Mac only)
  • JavaScript

These are best avoided unless you know what you’re doing!

Single-line fields

Oftentimes, you want to customize your Snippet for each person or situation. The Fill-in feature lets you do this. The simplest Fill-in type is a Single Line Field, which adds a blank space in your Snippet that you can fill in before expanding. Think of it like a blank line in a sentence, like a Mad Lib.

When you expand a Snippet with a Single Line Field or other Fill-in, a pop-up window appears that lets you fill in those fields before expanding. Press Enter or click OK to finish expanding the Snippet.

To add a Single Line Field to a Snippet:

  1. Place your cursor in the Snippet Editor where you want to insert the field.
  2. Click the Fill-In button in the Snippet Editor and select Single Line Field.

In the dialog that appears, fill out the Name field to set the field name that display when you expand the Snippet. Below that is a field where you can set the default value and you can also adjust the width of the field. The width option is just for looks—the field itself will adapt to however few or many characters you type. Click OK to insert the Single Line Field into your Snippet.

Here’s how it looks in the Snippet editor:

Multi Line Fields

We’re assuming you read the previous post about Single Line Fields. A Multi Line Field is the same thing, just… bigger. It’s a nice option if you want to add a more freeform comment field in your Snippet.

The Multi Line Field settings are identical to Single Line Field, with one exception: You can also specify the default display height of the fill-in. Again, this is purely cosmetic.

After expanding a Snippet with a Multi Line Field, you can click and drag on the field’s draft handle to change its size and shape. You can also adjust the Width and Height settings to improve the aesthetics.

Optional Sections and How They Work

Now we get into one of TextExpander’s more unique features: Optional Sections. An Optional Section is just what it sounds like: An optional addition to a Snippet that you can either include or not include in your expansion.

For an example of how this looks, see the com.intro Snippet we use for introducing ourselves. Each line with a checkbox by it is an Optional Section. When checked, the Optional Section is highlighted in green to indicate that it’ll be included in the expansion. When unchecked, it’s highlighted in red to let you know that it will not be included.

Optional Sections can include any other sort of Fill-In. In the example below, the three Optional Sections include Single Line Fields and Multi Line Fields.

Let’s see how it looks in the Snippet Editor.

Note the optional sections above: Optional Hobbies, Optional Food, and Optional Vacation. In the editor, the optional sections act as parentheses, beginning with the name of the Optional Section and ending with (end optional).

Adding Optional Sections

To add an Optional Section in the Snippet Editor, click the menu icon and choose Optional Section.

Enter a name and click OK. I like to add Optional to my names for clarity.

After the Optional Section is inserted, the cursor is placed inside the Optional Section block. You can then type or insert whatever optional content you want to include.

Screenshot 2025-03-03 at 1.03.25 PM

Popup Menus

Single Line and Multi Line Fields are “fill in the blank.” Popup Menus are multiple-choice. They’re great for enforcing consistency when you only need a few preset options.

Here’s a great example of a medical Snippet that uses several Popup Menus:

To add a Pop-Up Menu to a Snippet:

  1. Place your cursor in the Snippet Editor where you want to insert the field.
  2. Click the Fill-In button in the Snippet Editor and select Popup Menu.

  1. Enter a name for the Popup Menu.
  2. In the fields below, type in your options. You need at least two.
  3. Click OK.

Those are the basic steps, but there are many more options.

Using date and time as an option

You can click the calendar and clock icons to insert elements of the current date and time.

Adding additional options

Click the + to add an additional option.

Moving and deleting options

Click the ellipsis under each option to reveal a menu that lets you delete or move the option. Click the Move to Position dropdown to select where the option will appear in the list order.

Changing the default selection

Pop-Up Menus always have a default selection. By default, it’s the option in position 1. Click the Selected by Default radio button under an option to set it as the default instead.

1 Like