snipp...lders(5)
๐ NAME ๐
okay so this is snippetexpander-placeholders(5) from the Snippet Expander Placeholders Format Manual, and itโs literally the placeholders that can be used in Snippet Expander abbreviation bodies. bestie, this is your little cheat sheet for making snippets do cute dynamic stuff. ๐
โจ
โจ SYNTAX โจ
All placeholders are delimited (wrapped) by $$, with the placeholder name starting with an @ symbol. no cap, thatโs the whole vibe.
For example, todayโs date can be inserted with $$@date$$. iconic.
Some placeholders allow for extra arguments when : follows their name and that is followed by the argument. For example a format for a date, or the abbreviation for a snippet. Check the following descriptions for each placeholder for more details, bestie.
To use $$ in your snippet body, escape the second $ with a backslash like so: $\$. yes, thatโs the escape hatch. ๐ซถ
๐๏ธ @DATE & @TIME ๐๏ธ
Quick examples, bestie:
- Todayโs date with system format:
$$@date$$ - Todayโs date with custom format:
$$@date:%Y-%m-%d %H:%M:%S$$ - Tomorrowโs date with system format:
$$@date@+1D$$ - Date 2 weeks from today with custom format:
$$@date@+2W:%x$$ - Time 3 hours from now:
$$@time@+3H$$
@time is an alias for @date, with one important difference: the default output if no format specified is the default time format (%X) rather than default date format (%x). highkey important, donโt mix that up. โฐ
The optional format specified after : can take a format string as detailed in the GLib.DateTime.format function's docs, see https://valadoc.org/glib-2.0/GLib.DateTime.format.html.
The optional date calculation starts with an @ after the placeholder name, followed by a signed integer and unit. The unit types are as follows:
Y: YearsM: MonthsW: WeeksD: Daysh: Hoursm: Minutess: Seconds
You can apply more than one date calculation, for example +2h+30m adds 2 hours and 30 minutes to the current time. stacking those little time math moments, we love to see it. ๐ฅ
You can use both positive (+) and negative calculations, for example -3D takes 3 days from the current date. time travel-ish, but make it snippet. ๐ฆ
๐ @CLIPBOARD ๐
When $$@clipboard$$ is part of a snippetโs body, when its abbreviation is expanded the current text contents of the clipboard will replace the placeholder. yes bestie, clipboard text just slides right in. ๐
๐งฉ @SNIPPET ๐งฉ
You can have up to three levels of embedded snippets with the @snippet placeholder. nesting? in this economy? apparently yes, but only three levels deep.
The abbreviation for the snippet to be embedded is entered after :, for example $$@snippet:sigg;$$ expands the snippet with abbreviation sigg; in place of the placeholder. cute recursive-ish snippet moment. ๐
๐ @CURSOR ๐
Adding $$@cursor$$ to a snippetโs body will put the cursor in its place after expansion instead of at the end of the expanded text. main character cursor energy, honestly.
If $$@cursor$$ is entered more than once in a snippetโs body or via snippet embedding, then the last occurrence of the cursor placeholder wins. periodt. the final cursor placement is the one that ate.
The @cursor placeholder does not work when using the shortcut to open the search and paste window rather than auto-expansion. lowkey important caveat, so donโt come for the docs if that shortcut doesnโt vibe with @cursor. ๐
๐ SEE ALSO ๐
snippetexpander(1) snippetexpanderd(1) snippetexpanderx(1) snippetexpandergui(1)
๐ AUTHORS ๐
Created and maintained by Ian Jones <ian@ianmjones.com>. Up-to-date sources can be found at https://git.sr.ht/~ianmjones/snippetexpander. Information on how to contribute and where bug reports and feature requests may be submitted can be found on the project page at https://snippetexpander.org. slay, give the maintainer some love. ๐ซถ
and thatโs the whole vibe check: snippetexpander-placeholders(5) (aka snipp...lders(5)) from the Snippet Expander Placeholders Format Manual, dated 1980-01-01. go forth and make your snippets adorable and useful, bestie ๐
โจ๐
๐ฆ where this page comes from
- nixpkgs unstable: snippetexpanderd 1.1.2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms