Using Placeholders
Placeholders allow you to create dynamic templates in Velocity. Instead of hardcoding every detail, you can leave blanks to fill in when you expand the snippet.
What are Placeholders?
Placeholders are brace-wrapped tokens inside your snippet body, like {name}, {email}, or {date}.
When you type a trigger that contains placeholders, Velocity will expand the snippet and instantly place your cursor inside the first placeholder.
Example
trigger: intro
body: Hi {name}, I work at {company} and I wanted to discuss {topic}.
Cycling Through Placeholders
Velocity uses a special state machine to make filling out placeholders fast:
- Expand: Type your trigger and press Space. Velocity enters the PLACEHOLDER state and your cursor moves to the first placeholder (e.g.,
{name}). - Type your replacement text: The placeholder text is automatically selected, so you can just type over it.
- Cycle: Press Ctrl+Right (default) to jump to the next placeholder. (Your cursor will quickly move to
{company}). - Finish: On the last placeholder, press Enter or Ctrl+Right again to commit the expansion and return to normal typing.
Note: While in PLACEHOLDER state, the Space key acts as a normal space character and will not trigger another snippet expansion. This prevents accidental nested expansions while you are filling out a template.
A Note on the Tab Key
In some applications like Gmail and Notion, the Tab key is heavily used for navigating the application's interface. To prevent Velocity from interfering with these apps, Tab expansion and cycling is disabled on these sites. We recommend using Ctrl+Right to cycle through placeholders globally.
Next Step: Setting up encrypted sync