ClippingPlaceholderReference

From BBEditExtras
Jump to: navigation, search

Here is a recreation of the Clippings and Placeholder reference from the BBEdit User Manual

You can also see this list of Placeholders by Help -> BBEdit Help -> Clippings Reference -> Substitution Placeholders

Placeholder Description
#BASENAME# The name of the file stripped of its rightmost period-delimited portion. For example, if the file is named “test.html”, the base name is “test”, while if the file is named “test.foo.html”, the base name is “test.foo”.
#BLOCK# Inclusion of this placeholder guarantees that the inserted text will begin and end with a line break. (BBEdit 11 and later)
#CLIPBOARD# Contents of the current clipboard
#DATE# Current date, formatted according to your Format settings in the International panel of the System Preferences
#DATETIMEXXX# Inserts a localized, region-aware date whose format is specified by the ICU format string XXX (see “Date Formats” below)
#DATETIME_GMT XXX# Inserts the universal, region-aware date whose format is specified by the ICU format string XXX (see “Date Formats” below)
#FILE# File name of the document into which the item is inserted
#FILE_EXTENSION# The filename extension for the file (determined as the rightmost period-delimited portion of the filename, without the period). For example, whether the file is named “test.html” or “test.foo.html”, the filename extension is "html".
#FUNCTION# If the item is being inserted into a source file, the name of the current function
#GMTIME YYY# The current GMT time formatted according to the parameters YYY (see “Time Formats” below)
#INDENT# When used in a clipping with multiple lines, causes every line after the first to be indented to the same whitespace level as the line in which the item was inserted (see the supplied WML clippings for examples)
#INLINE# Strips all trailing vertical white space from the item before insertion (see also the Text Files preference panel)
#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 Search menu
#LOCALTIME YYY# The current local time formatted according to the parameters YYY (see “Time Formats” below)
#NAME# The long name of the active user account. (There is no intrinsic placeholder for the short name, but you can use #inline##system whoami# to obtain it.)
#PLACEHOLDERSTART#label#PLACEHOLDEREND# Inserts a placeholder “hop” point which you can go to by using Next/Previous Placeholder.
#SCRIPT filename# Result of running the specified AppleScript
#SELECT# If there was a selection when the clipping was expanded, it will be put at this position; otherwise, the insertion point will remain here.
#SELECTIONORPLACEHOLDER label# If there is an active selection, the placeholder will be replaced with the selected text. If there is no selection, a placeholder named with the specified text (“label”) will be inserted into the document. This placeholder is particularly useful when building clippings for insertion via both BBEdit’s auto- completion mechanism and the clippings palette (or direct key equivalent).
#SELSTART# and #SELEND# Mark a range within the inserted material to be selected after the insertion. You can use multiple pairs of these placeholders within a single clipping.
#SYSTEM shell_script# Given the full path to a shell command or script, BBEdit will run that command or script and insert the result.
#TIME# Current time, formatted according to your Format settings in the International panel of the System Preferences
#UUID# A 128-bit UUID (universally unique identifier), formed by combining a value unique to the computer on which it was generated (usually the Ethernet hardware address) with a value representing the number of 100-nanosecond intervals since October 15, 1582