QA Graphic

BBEdit Clippings

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.

Creating Clipping

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.

Activate Clipping

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.

Example

This clipping snippet will apply a specific paragraph class to the selected text.

#SELECT#

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.

#INSERTION#

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.

#SELECTIONORINSERTION#

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.

#CLIPBOARD#

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.

#SELECT#

The selected Text. Useful when you want to wrap the selected text around tags.

#SYSTEM shell_script#

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:

#SYSTEM uptime#

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.)

 

Comments

Add Comments

Name:
Comment:

 

About

A Mac veteran since 1989, I'm here to share my experience with tips and tricks every Friday. Witnessing the evolution of Mac software and hardware firsthand, I've gained a deep understanding of how these machines work and can help you troubleshoot any issues that may come up.

Schedule

SundayOpen Topic
Monday Media Monday
TuesdayQA
WednesdaySnagIt for QA
ThursdayPython
FridayMacintosh
SaturdayInternet Tools