TypeMetal

Creating a Snippet

In a Snippet Set Window

Click the “+ Snippet” button at the bottom of the snippet set window.

TypeMetal creates a new, initially empty and untitled snippet, in the snippet group where the current selection resides. (If your snippet set doesn’t have any groups, TypeMetal creates a group to put the snippet in.)

TypeMetal then highlights the snippet’s title (initially, “New Snippet”) for editing, so you can easily name the snippet. Give the snippet a title that conveys its purpose or intended usage. This will help you (or another author using your snippet set) choose appropriate snippets when applying snippets in a document.

Once you’ve named your new, initially empty snippet, you’ll want to proceed to giving it some content.

In an HTML Window

When editing an HTML file that has an associated snippet set, you can easily define a new snippet from any selection in the HTML document. Create new snippets on the fly, as you notice things you’re building repeatedly. Then find and apply them with the ease of a few keystrokes as you continue writing.

There are two snippet creation commands, for the two kinds of snippets you’ll want to create:

These snippet creation commands are available in three places:

If these commands are disabled in the menus, make sure your document has an associated snippet set, and make sure you are operating on an appropriate selection. A “simple” snippet can only be created from an exactly selected HTML element (or a right-clicked element segment in the path bar), not from an arbitrary selection.

When you create a new snippet using one of these commands, TypeMetal adds it to the HTML file’s associated snippet set, and opens the snippet set’s editor window with the new snippet selected. You may then want to give the snippet a meaningful title, edit the snippet’s content, or move the snippet elsewhere within the snippet set.