FillIn Template Variables
FillIn is CodeExpanderâs form-on-expand feature: insert FillIn variables in a snippet (e.g. %filltext%, %fillarea%); on expand a popup opens for you to fill, then variables are replaced. Good for prompts, email templates, parameterized code blocks.
Variable Types
1. %filltext% â Single-line text
Format:
%filltext&name=id&default=value&width=px%Parameters: name required; default, width (default 100), case optional.
Example:
Hello, %filltext&name=username&default=World&width=150%!Variable case formatting:
// After typing "hello world", output is converted according to case parameter:
camel: %filltext&name=var&case=camel% â helloWorld
pascal: %filltext&name=var&case=pascal% â HelloWorld
snake: %filltext&name=var&case=snake% â hello_world
kebab: %filltext&name=var&case=kebab% â hello-world
upper: %filltext&name=var&case=upper% â HELLO WORLD
lower: %filltext&name=var&case=lower% â hello world2. %fillarea% â Multi-line text
Format: %fillarea&name=id&default=...&width=...&rows=N%
Parameters: name required; default, width, rows (default 2) optional.
3. %fillnote% â Comment (no output)
Format: %fillnote&name=id&default=comment&width=...%
Shown in editor only; removed from output.
4. %fillcheck% â Checkbox
Format: %fillcheck&name=id&default=value when checked&isCheck=0|1&width=...%
Example: when checked inserts default; when unchecked inserts nothing (or empty).
5. %fillmenu% â Dropdown
Format: %fillmenu&name=id&default=option&opt=Option1&opt=Option2&...%
Parameters: name, opt (one or more) required; default, isCheck, info, width optional.
Date %date%
Format: %date&format=...&lang=...&calc=days offset%
Common formats: YYYY-MM-DD, YY-M-D, HH:mm:ss, L / LL / LLL / LLLL (localized).
Keyboard %clavier%
Format: %clavier&key=key&modifier=mod%
Presets: %clavier&key=Enter%, %clavier&key=Escape%, %clavier&key=Tab%
Custom: %clavier&key=V&modifier=command% (Cmd+V)
Function variables
| Variable | Description |
|---|---|
%c% | Cursor position â caret stays here after expand. Multiple %c% supported for multi-cursor tabstop jumping |
%cv% | Clipboard content â insert current clipboard text (format params supported, see below) |
%s:abbr% | Nested snippet â insert content of snippet with that abbreviation |
Example:
function %filltext&name=funcName&default=myFunction%() {
%c%
}Multi-cursor Tabstop (multiple %c%)
You can use multiple %c% in a snippet. After expansion, the caret is placed at the first %c%; press Tab (or the tabstop jump key configured in Settings) to jump to the next cursor position in sequence.
Example:
SELECT %c% FROM %c% WHERE %c%;After expansion:
- Caret is placed after
SELECT - Press Tab to jump after
FROM - Press Tab to jump after
WHERE
Great for code templates that require filling multiple placeholders in order.
%cv% format parameters
%cv% accepts optional parameters to format clipboard content before inserting â especially useful in AI prompt templates:
| Parameter | Example | Effect |
|---|---|---|
xml=TAG | %cv&xml=error% | Wraps as <error>content</error> |
md=LANG | %cv&md=python% | Wraps as Markdown code block ```python\ncontent\n``` |
md= | %cv&md=% | Wraps as code block without language tag |
truncate=N | %cv&truncate=2000% | Truncates to N characters (appends ... when cut) |
trim=1 | %cv&trim=1% | Strips leading/trailing whitespace |
Parameters can be combined. Processing order: trim â truncate â xml/md. When both xml and md are present, xml takes precedence.
AI prompt examples:
# Debug this error (copy the error first, then trigger the abbreviation)
Here is the error:
%cv&xml=error&truncate=3000%
Please help me find the root cause.# Code review (copy the code first, then trigger the abbreviation)
Please review this code:
%cv&md=python&trim=1&truncate=4000%FillIn Window
Flow
User types abbreviation â FillIn detected â Form opens â User fills â Variables replaced â OutputShortcuts
| Shortcut | Action |
|---|---|
Cmd/Ctrl + Enter | Confirm and insert |
Enter / Tab | Next field |
Content types
| Type | Description |
|---|---|
plain | Plain text |
rich | Rich text (HTML) |
shell | Shell (run and output) |
js | JavaScript (run and output) |
python | Python (run and output) |
applescript | AppleScript (macOS) |
powershell | PowerShell (Windows) |