|
Help: Creating Snippets
Three Steps to Creating a Basic Snippet
- Click on New Snippet
in the toolbar or choose from the menu.
- Add the snippet content in to the "Content" box on the right.
- Assign an abbreviation in the "Abbreviation" box below the content.
Note: You can also create new snippets from selected text or from the Clipboard contents. For more details, see below.
If you have TextExpander hidden in the Dock (see Preferences: Appearance), you will need to access the snippet creation menus via the TextExpander menu bar item or via predefined hotkey shortcuts.
A good abbreviation is:
- short
- easy to remember
- unlikely to be typed by accident
- unique
Duplicating an abbreviation's first character (ddate, ssig, zzip) is one way of creating abbreviations that meet these critieria.
If abbreviations conflict, they are highlighted in orange. Conflicting abbreviations cannot trigger expansions.
Format
Snippet content has four format options:
- Plain Text
When expanded, the snippet content conforms to the current text style.
- Formatted Text, Pictures
Color, size, font and alignment can be specified for text. Images can be used.
- AppleScript (advanced)
The snippet content can be an AppleScript, which is triggered by the abbreviation.
- Shell Script (advanced)
The snippet content can be a shell script, which is triggered by the abbreviation.
To set content format, click on the drop down menu at the top of the Content box.
Using Formatted Text in Snippets
- Set the content format to Formatted Text, Pictures.
- Add snippet content in the Content box.
- Select text to be formatted.
- Click on the
button below the Content window to access Font and Text options for fonts, size, color, and alignment.
Adding Images to Snippets
- Set the content format to Formatted Text, Pictures.
- Drag your image into the Content box or copy it to the Clipboard and use Command + V to paste it into TextExpander.
- To remove an image, use the Delete key.
A default content format is set in under the Expansion tab.
Adding Macros to Snippets
Insert predefined macros to snippets via the insert button below the Content box. Predefined macros include:
- Date
Inserts the day, month and year of the current date in a variety of formats
- Time
Inserts the current time in hours, minutes, seconds and AM/PM.
- Date/Time Math
Inserts a date or time that takes the current date/time and adds to or subtracts from it; e.g. five days from today.
- Snippet
Nest a snippet within your snippet. For example, you might want to use your telephone number snippet in your email signature snippet. If your telephone number changes, you need only update one snippet.
- Key (new!)
Inserts a key press for Enter, Esc, Return or Tab; useful for web forms.
- Fill-in (new!)
Inserts custom fields into your snippets that can be filled in while expanding the snippet; useful for form letters, e.g. "Dear ____, Thank you for the ____."
- Clipboard
Inserts whatever is on the Clipboard into your snippet when expanded.
- Picture...
Browse for an image to insert. Images can also be dragged directly into the content box or pasted from the Clipboard.
- Cursor
Specify where you want the cursor to appear after the snippet is expanded. TextExpander repositions the cursor automatically.
Labeling Snippets
By default, a snippet's label is a shortened version of the snippet contents. You can specify a short, more useful label to appear in the snippet list instead. Enter the label in the Label field below the Content Box.
Setting Case Sensitivity
TextExpander abbreviations can be case sensitive. There are three options:
- Case Sensitive (aB, Ab, ab, AB differ)
Example: "YT" expands to "Yours Truly", "yt" does not.
- Ignore Case (aB, Ab, ab, AB same)
Example: either "YT" or "yt" expands to "Yours Truly"
- Adapt Snippet to Case of Abbreviation
Example: "Yt" expands to "Yours truly", "yt" expands to "yours truly"
A default case sensitivity is set in under the Expansion tab. (See Preferences.) You can change the case sensitivity setting on individual snippets by clicking the drop-down menu bar above the Abbreviation box.
Create Snippet from Selection or Clipboard
A quick way to add snippets to your collection is to create new snippets based on a text selection or on the Clipboard contents. If you've just typed something and realize that it would be a useful snippet for future use, follow these steps:
- Select the text you want for the snippet content.
- Click the TextExpander menu bar item
- Click (or if you have copied the text to the Clipboard.)
The Create Snippet window opens with your selection (or the Clipboard contents) already entered in the Content field. Assign an abbreviation and a snippet group and click Create.
You can also access or via hotkey.
Edit last expanded snippet (new!)
You can easily edit snippets as you are using them. If you expand a snippet and realize that it needs to be revised (e.g. new phone number in your signature, new product name in your boilerplate), try this:
- Click the TextExpander menu bar item
- Click
- Make your revisions in the Edit Snippet window and click Save.
You can also access via hotkey.
Deleting a Snippet
- Select the snippet in the Snippet list on the left side of the TextExpander main window.
- Click on Delete
in the toolbar, or use the Delete key on your keyboard.
|
|