Snippets and text expansion
Cleat keeps snippets in one Markdown file and expands them by keyword in any app. Type ;sig and it becomes your signature. Placeholders fill the date and clipboard.
Snippets live in a single file: ~/.config/cleat/snippets.md. Edit Snippets File in the palette opens it.
The format
Every ## Heading starts a snippet. An optional keyword: line right under it sets the expansion trigger, and everything up to the next heading is the body.
## Signature
keyword: ;sig
Best,
Gjorge
## Meeting notes
keyword: ;mtg
# {date:yyyy-MM-dd} · {clipboard}
-
{cursor}
Pasting
Type snip or pick Snippets in the palette, choose one, press Return. It is pasted into the app you came from.
Expansion
With Expand snippet keywords while typing on in Settings › General, typing ;sig in any app replaces it with the body. Cleat watches keystrokes only to spot keywords; nothing is stored. Expansion pauses while an input method is composing, so Japanese and Chinese input are not interrupted. This needs Accessibility access.
Placeholders
| Placeholder | Becomes |
|---|---|
{date} |
Today, in your locale’s short form |
{time} |
The current time |
{datetime} |
Both |
{date:yyyy-MM-dd} |
A date in the format you give |
{clipboard} |
Whatever is on the clipboard |
{uuid} |
A fresh UUID |
{cursor} |
Where the cursor ends up after pasting |
Importing
Raycast’s snippet export and Alfred’s snippets both import, keywords included. See Import from Alfred or Raycast.