Popular Placeholders to Know
BBEdit Clipping allows users to add their own pre-defined bits of text into any document. There's no size limit and you can add special substitutions.
It's easy to create a snippet, in BBEdit simply select a text and right-click and then choose Save Selection As Clipping. It really is that easy.
You can activate a clipping by typing a shortcut or by assigning a key combination. The key combination is more powerful as you can apply the clipping to the selected text.
This clipping snippet will apply a specific paragraph class to the selected text.
Popular Clipping Substitution Placeholders
These are the five placeholders that are most useful to know. You can find all the placeholders in the official BBEdit Manual.
Marks the place where BBEdit will place the insertion point after inserting the item; if multiple #INSERTION# placeholders are used, the second and subsequent occurrences are replaced with a placeholder "<##>", which can be used with Go to Next/Previous Placeholder in the Go menu. Useful when you apply a snippet via typing and you want the cursor to appear within the snippet.
If there was a selection when the clipping was expanded, it will be put at this position; otherwise, the insertion point will remain here. It is useful when you want to use a clipping as a keyboard shortcut or activate it when typing.
Contents of the current clipboard. Useful when you want to use the clipboard as part of the clipboard substitution. For example, if you want to use a GitHub branch name.
The selected Text. Useful when you want to wrap the selected text around tags.
Given the full path to a shell command or script, BBEdit will run that command or script and insert the result. This is a pretty powerful way to apply external commands with your BBEdit clippings.
Shell Script Example:
This will tell me the current uptime on my computer. I save the clipping as "uptime" and anytime that I want the computer uptime, I just type uptime. (Not something I would do often but a cool example.)