Tips on Shared Snippet Groups

Do you share a snippet group with a few other folks, a team, or an office?

If you don’t but would like to, you can set that up by hosting the group on your server, or even in a public Dropbox folder. You can find the exact steps here.

Here are a few tips on what makes a good shared group.

The Rules for Good Abbreviations Still Apply

Make abbreviations:

  • short
  • easy to remember
  • unique
  • unlikely to be typed by accident

But, you have the added difficulty of not knowing what abbreviations the team already has in their other groups, so making them extra unique is a plus. One way to avoid snippet conflicts is to use a naming strategy, for example, putting the same prefix onto each snippet in the group.




Alternate Abbreviations

If a team member doesn’t want to use the given abbreviation, there is the option of setting up a new snippet to expand the content of the old one but use its own unique abbreviation.

Create a nested snippet:

  1. Make a new snippet and set the abbreviation to whatever you like.
  2. For the snippet content, from the Insert menu (cursor button), located just above the Abbreviation menu, click on Snippet and then locate the old snippet.
    Alternately, if you know the snippet’s abbreviation you can just type the nested snippet syntax:
%snippet:{snippet name}%

Where {snippet name} is the abbreviation of the original referenced snippet.

You now have a snippet with a unique abbreviation, who’s content is pulled directly from another snippet.

Snippet 1

abbreviation: ,,email

Snippet 2

abbreviation: em1
content: %snippet:,,email%

Non-expanding Snippets

If the shared group’s snippets do interfere with personal snippets, try making alternate abbreviations for them as explained above and then prevent the original group from expanding with the original abbreviations.

Prevent a Group from Expanding:

  1. Click on the snippet group, the Group Settings will appear to the right.
  2. Set the “Expand in:” menu to “No applications (disabled).”

Good “Label” -ing

Each snippet consists of an abbreviation, the content it expands into, and a label, which is optional. If the abbreviation is not self-explanatory, and the content is too long to read at a glance, it will be hard to remember what the snippet does. Having a clear and brief label will help with that. The label is searchable, just like the abbreviation and content, so this is a good place for a search term that is not already in the snippet.

Use labels

More Snippet Explanation

If the label isn’t quite enough to explain the snippet, or all the parts of a multi-part snippet, you can use optional sections.

An optional section is a type of fill-in where you you have text in the snippet content, but you choose whether it expands with the snippet on a case by case basis.

In this specific case you would turn off “Include by default.”

When a user expands the snippet, they will see the extra text in the temporary expansion window, but it won’t expand with the rest of the snippet.

Use optional fields

Have any tips or tricks of your own? Let us know!