,

Organize Your Snippets

The more you use TextExpander, the more ways you figure out to use it—and that usually leads to the creation of more snippets.

The small assortment of snippets that came with TextExpander by default are easy to remember, but sooner or later (sooner if you import some of the standard snippet collections that are available—you’ll find out about those in Save, Add, and Import Groups), you may find that you have dozens, or hundreds, or even thousands of snippets, and that your memory isn’t up to the task.

Isn’t it a lucky coincidence that TextExpander has features that help you organize your snippets?

In this chapter, I explain how to manage your snippets by group, and how to customize certain snippet settings that apply by group.

Make Groups and Arrange Them

In TextExpander, snippets are organized into groups, which appear as folders in the Groups list at the left of the TextExpander window; the same groups also appear in the TextExpander quick-access menu, in the same order as they appear in the TextExpander window.

Each group can contain an arbitrary number of snippets, from none to many thousands. To show or hide the snippets contained in a group, click the group icon’s triangle in the Groups list.

When you first install TextExpander and Run the Snippet Creation Assistant, your snippets appear in a single group in the TextExpander window: My Snippets. This is fine when you can count the number of snippets you have on your fingers, but when you reach the point where you have to take off your shoes to count them, you’ll want more groups so you can divide your snippets among them.

Make a Group

TextExpander makes it easy to add new groups to the Groups list. Use whichever one of the following three methods that appeals to you:

  • Type Command-Option-N.
  • Click the New Group button in the TextExpander window’s toolbar.
  • Click the Add button at the bottom left of the TextExpander window, and then choose New Group from the menu that appears (Figure 17).
**Figure 17:** Create a new group from the Add pop-up menu.
Figure 17: Create a new group from the Add pop-up menu.

When you first create a group, its name is (Untitled), and its group icon appears beneath the last group that you had worked with or had selected in the Groups list.

Rename a Group

It’s easy to change the new group’s name when you create it, since its default name is selected in the Group Settings pane’s Name field (displayed on the right side of the TextExpander window): just type a new name.

You can also rename an existing group, as follows:

  1. In the TextExpander window, click a group.

    The Group Settings pane appears in the right half of the window.

  2. Edit the text in the Name field.

Rearrange Group Order

The Groups list has no inherent order, nor does TextExpander provide any commands to help you arrange your groups. However, you can arrange groups manually by selecting one or more of the groups and dragging them to a new location in the list (Figure 18).

**Figure 18:** Grab and drag one or more groups to a new location.
Figure 18: Grab and drag one or more groups to a new location.

You can select multiple groups by Shift-clicking (to select a range of groups) or Command-clicking (to select discontiguous groups). When you move a discontiguous set of groups, they appear in a contiguous set in their new location.

It’s important to note that the Groups list is flat—you can’t place a group folder inside of another group folder. Therefore, you need to think carefully about how to name and arrange your folders, since you can’t create hierarchies that, say, go from general to specific categories. Here are some possible ways to subdivide your snippets:

  • By use: Create groups that represent how you use the snippets they contain. For example, you might create one group for email signatures, one group for Objective-C code snippets, and one group for form-letter snippets.
  • By application: Create groups that contain the snippets that you use only for a particular application, such as one for Word, one for BBEdit, and so on.
  • By project: Collect the snippets you use for particular projects (such as, say, a book about TextExpander) into their own groups.
  • By type: You might want to create one group that contains only plain text snippets, another for only Formatted Text, Pictures snippets, yet another for snippets that contain fill-ins, and so on.
  • By device: TextExpander touch on iOS supports most but not all the kinds of snippets you can create on the Mac; for example, the iOS app doesn’t support the key macros described in Include Special Keys. You can segregate snippets that don’t work properly on iOS into their own groups, and use the Ignore on iOS group setting that TextExpander touch provides for those groups so the app won’t try to expand them (see Manage Your Groups).

You are not constrained by any one scheme. Create your groups according to the scheme, or group of schemes, that best works for you.

Move Snippets among Groups

Once you have created a group, moving snippets into that group, or into any other group for that matter, is equally simple:

  1. Open one or more groups so that you can see the snippets.
  2. Select the snippets you want to move, and then drag them to the group where you want them to go.

    You can drop the dragged snippets onto a group’s folder icon, or, if the group folder is open, you can drop them anywhere in the group’s list of snippets. You can select a range of snippets (Shift-click) or a discontiguous set (Command-click). You can even select snippets from more than one group at a time and then move them.

Delete Groups

Finally, if you want to delete a whole snippet group—including the snippets it contains—select it, and then do one of the following:

  • Press Delete.
  • In the TextExpander window’s toolbar, click the Delete button.

No matter how you choose to delete the group, TextExpander asks you to confirm the deletion.

Organize a Group’s Contents

Unlike groups, which have no inherent order nor any method for automatically sorting them, a group’s snippets are just the opposite: there is no way not to show them in some kind of sorted order.

Figure 19 shows the sorting options that are available from the TextExpander application’s View menu and from the Tool pop-up menu at the bottom left of the TextExpander window.

**Figure 19:** TextExpander gives you seven ways to sort snippets. You must choose one.
Figure 19: TextExpander gives you seven ways to sort snippets. You must choose one.

Choose any of the sorting options to sort all of your snippets, within every group, in the chosen order. Choose the same option a second time if you want to sort the snippets in reverse order.

Save, Add, and Import Groups

As you work with TextExpander, you may find that you create snippet groups for particular projects. Once you complete those projects, however, you may not want those groups hanging around, cluttering your Groups list in the TextExpander window or in the TextExpander quick-access menu. As you learned in Delete Groups, all it takes to send an unwanted snippet group to the Choir Eternal is a tap of the Delete key and a confirming click.

Unfortunately, not all completed projects stay completed, and there may come a time when you wish you had a group back that you so blithely discarded. Fortunately, you can save a copy of a group before you dispatch it, and you can add the group back from the copy.

Save a Copy of a Group

Here’s how to save a copy of a group:

  1. In the TextExpander window, in the Groups list, click to select the group you want to save.
  2. From the Tool pop-up menu, choose Save a Copy of Group “group-name” (Command-S).
  3. In the Save dialog, choose a location and a name for the saved group and then click Save.

Saved groups include the snippets contained in the group, their labels and abbreviations, and the name of the group. However, the copy does not include any of the other group settings (see Customize Group Settings, later in this chapter); if those settings are different from the default, you have to reset them manually when you add the group back.

Add a Group

You can add groups from files; from URLs that point to TextExpander snippet groups made available on the Web from other TextExpander users; and from Smile itself, which maintains a collection of very useful snippet collections.

Add a Group from a File

To add a group from a file saved on your Mac (or on a file server accessible to your Mac), do the following:

  1. In the TextExpander window, from the bottom-left Add pop-up menu, choose Add Group from File (Command-O).
  2. In the Choose Snippets File dialog (Figure 20), navigate to the file that contains the group you want to add.
    **Figure 20:** You can add saved group files, as well as files in several other formats.
    Figure 20: You can add saved group files, as well as files in several other formats.
  3. Optionally, check or uncheck Import as Editable Local Copy.

    When Import as Editable Local Copy is unchecked, the snippets in the group cannot be altered, nor can snippets be added to the group. See Customize Group Settings (a few pages ahead) for more information about this setting.

  4. Click Open.
Add a Group from a URL

You can find all sorts of snippet groups on the Web. A search for “TextExpander snippets” is a good way to find some. Also, refer to Learn More, later in this ebook, for more snippet group resources.

To add a snippet group from a URL, choose Add Group from URL from the TextExpander window’s bottom-left Add pop-up menu, and then enter the URL in the dialog that appears.

Unlike groups added from files, you don’t have the option to import groups from URLs that are locally editable: snippet groups added from URLs cannot be altered (however, see the tip a page or so ahead for a workaround).

Add a Predefined Group

Finally, you can add predefined snippet groups directly from Smile, the fine folk who bring you TextExpander.

To add a predefined snippet group, choose Add Predefined Group from the TextExpander window’s bottom-left Add pop-up menu, and then choose the group you want to add from the submenu.

The following groups are currently available:

  • Accented Words: If you can’t remember which way the accent goes in voilà, this group is for you. It contains dozens of words, properly accented, with abbreviations that are, for the most part, their plain unaccented text equivalent (for example, the abbreviation for voilà is voila).
  • AutoCorrect Snippets: This group contains over one hundred commonly misspelled or mistyped words. The abbreviation for each is the common misspelling/typing; the snippet content is the correct word. If you always mistakenly type embarass you’ll never be embarrassed again when you have this group installed.
  • Emoji: For something more colorful than basic symbols, you can insert emoji characters. While this collection does not include every available emoji (and, yes, I am about it) it includes quite a few of them.
  • HTML & CSS Snippets: This one is for the Web developers out there. The group currently contains almost 90 snippets that make Web coding easier by generating HTML tags, character entities, and common CSS blocks. Most of the HTML tags position the cursor appropriately between the open and close tags. The abbreviations tend to be short and memorable.
  • Internet Productivity: This small collection contains snippets that run scripts, such as one that validates URLs (see Script with Snippets). Use this one if you need to validate or shorten URLs a lot.
  • Symbol Snippets: If you using symbols rather than words, or if you can never remember how to type the ⌘ character, you’ll appreciate this collection. It can make you a snippet-typing ★.
  • TidBITS AutoCorrect Dictionary: This is the AutoCorrect Snippets group that ate the cake that made Alice open out “like the largest telescope that ever was.” Based upon a list created by Micah Alpern and distributed by TidBITS co-founder Adam Engst (where have we heard that name before?) back in the last century, it currently contains almost 2,500 commonly mistyped and misspelled words as abbreviations, with the correct spellings as the expanded content. (Oddly enough, though, this version of the file doesn’t substitute “the” for the very common typo, “teh.”)

Customize Group Settings

Groups let you not only parcel out your snippet collection into manageable chunks, but also change how and when snippets expand, as well as the sound they make when expanding, on a group-by-group basis. The key to this smörgåsbord of settings is the Group Settings pane (Figure 21), which appears on the right side of the TextExpander window when you select a folder in the Groups list.

**Figure 21:** You can change snippet expansion behavior on a group-by-group basis.
Figure 21: You can change snippet expansion behavior on a group-by-group basis.

Here are the settings you can see and change for any group:

  • Name: Use this field to change the name of the group as it appears in the Groups list. Note that the name does not have to be unique (though it’s a good idea to use unique group names for your own sanity’s sake): TextExpander maintains a separate private identifier for each group, along with the details of where it’s located (its file location, its source URL, or if it is internal to TextExpander).
  • Expand In: By default, TextExpander tries to do its magic within any text-editing environment in any program. You can change that default in TextExpander’s Preferences (see Set Expansion Options).

    Use this group setting to override the default, and specify whether TextExpander expands the group’s snippets in the following:

    • All applications
    • All applications except those you specify
    • Only in those applications you specify
    • No applications (in effect, disabling the group’s snippets)
  • Sound: You can choose the system sound that TextExpander plays whenever it expands a snippet. One of the sounds, for those who value the sounds of silence, is None. By default, TextExpander uses the sound setting from its preferences (in the Expansion preference pane), but, by using this group setting, you can have snippets from different groups play separate sounds when they expand.
  • Expand When: This setting for newly created groups is Whitespace Precedes Abbreviation; that is, if you type an abbreviation while in the middle of typing a word, TextExpander won’t expand it.

    Whitespace is any of the word-separating characters, such as Return, Space, Tab (you know: stuff that on a white background looks white). You can, instead, specify that expansion occur after any character, or after all but letters and numbers; use this last when you want abbreviations to expand after punctuation like quotation marks (for example, when you type a movie or an article title), parentheses, brackets, dashes, and the like.

    In many cases, the default Whitespace setting is fine, but you may have specific situations when you really want an abbreviation to expand in the middle of a word (such as, for example, when writing Objective-C code where you may have long function names that begin with identical strings, like “NS”).

  • Inline Search: You can set a hotkey to help you navigate a huge snippet collection: for example, type a character or two and then press the Inline Search hotkey and you’ll see a list of suggested abbreviations for what you just typed (read Use Hotkeys and Search Inline). Uncheck this setting and TextExpander does not suggest any of the abbreviations contained in that group’s snippets collection. You may want to uncheck it for, say, the TidBITS AutoCorrect group, since you don’t care what the abbreviations are for it (remember, the abbreviations in autocorrect groups are misspellings; see Add a Predefined Group).

For any groups you add either from URLs or from files with the Import as Local Editable Copy option unchecked, you have an additional setting, Update. Use the Update setting to specify when TextExpander checks the original location of the group to load the latest version. If you use a shared snippet group that changes often (say you belong to a workgroup that shares a snippet group via a local file server), you can pick an update schedule to keep your shared snippets up to date. The choices for an update schedule are Daily, Weekly, Monthly, or Never (the default).

By the way: changes that you make to Group Settings take place immediately, so feel free to experiment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.17.12