Browse the handbook
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.
Editing in Settings
Settings › Snippets & Quicklinks has a form: pick a snippet, edit its name, keyword and body, and watch the preview fill in the placeholders. Add and Delete manage the list. Save writes snippets.md, keeping any notes you left above the first heading, and the file remains the source of truth, so an editor or a sync tool can still change it. The same pane edits quicklinks as keyword, name and URL rows.
Fields
{field:Name} in a body asks for a value before pasting, in one dialog for all the fields, and {field:Greeting|Hello} offers a default. This works from the palette and from keyword expansion.