Skip to Content
Documents📖 Reference🧩 FillIn Variables

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.

Document index ¡ Reference


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 world

2. %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

VariableDescription
%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:

  1. Caret is placed after SELECT
  2. Press Tab to jump after FROM
  3. 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:

ParameterExampleEffect
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 → Output

Shortcuts

ShortcutAction
Cmd/Ctrl + EnterConfirm and insert
Enter / TabNext field

Content types

TypeDescription
plainPlain text
richRich text (HTML)
shellShell (run and output)
jsJavaScript (run and output)
pythonPython (run and output)
applescriptAppleScript (macOS)
powershellPowerShell (Windows)