Snippet Variables
This feature requires TalkWriter Pro or Enterprise. Upgrade
Snippet Variables make your text snippets dynamic. Instead of expanding to the same static text every time, a snippet can insert today's date, your clipboard contents, or position your cursor exactly where you want it.
Variables Reference Table
| Variable | What It Inserts | Example Output |
|---|---|---|
{date} | Today's date in full format | March 27, 2026 |
{date:short} | Short date format | 03/27/2026 |
{date:iso} | ISO 8601 format | 2026-03-27 |
{time} | Current time | 2:45 PM |
{time:24} | 24-hour time | 14:45 |
{clipboard} | Whatever you last copied | (contents of your clipboard) |
{cursor} | Places your cursor here after expansion | (no visible text) |
Example 1: Daily Note Header
Trigger: /today
Expansion:
## Notes for {date}
{cursor}
Result: Expands to a markdown header with today's date and places your cursor right below, ready to type.
Example 2: Email Timestamp
Trigger: /sent
Expansion:
Sent on {date} at {time}
Result: Sent on March 27, 2026 at 2:45 PM
Example 3: Quick Paste Reply
Trigger: /wrap
Expansion:
Re: {clipboard}
Thank you for your message regarding the above. {cursor}
Best regards,
Jane Smith
Workflow: Copy the subject line, type /wrap, and the subject is inserted automatically. Your cursor lands right where you need to start writing.
Example 4: Timestamped TODO
Trigger: /todo
Expansion:
// TODO: {cursor} — Added {date:short}
Result: A timestamped code comment with your cursor positioned to type the task description.
Creating a Snippet with Variables
- Open Settings > Snippets
- Click + New Snippet
- Enter your trigger (e.g.,
/today) - In the expansion field, type your text and insert variables using curly braces
- Click Save
You can combine multiple variables in a single snippet. Use {cursor} once to control where your cursor lands after the expansion. If you include multiple {cursor} variables, TalkWriter uses the first one.
Variable names are case-sensitive. Use {date}, not {Date} or {DATE}. Unrecognized variables are left as plain text.
FAQ
Can I use more than one variable in a snippet? Yes. Mix and match as many as you need in a single expansion.
What if my clipboard is empty when I use {clipboard}?
The variable expands to an empty string. No error is shown.
Do variables work during voice dictation? Yes. If you dictate a snippet trigger, the expansion includes resolved variables just as it would with typed triggers.
Can I create my own custom variables? Not currently. Custom format strings are on the roadmap for a future update.