Config Reference
Match File Schema
matches:
- trigger: ":hello" # Single trigger keyword
triggers: [":hi", ":hey"] # Multiple triggers (alternative)
replace: "Hello World!" # Static replacement text
form: "Hello [[name]]!" # Form layout with [[field]] placeholders
form_fields: # Field configuration (for forms)
field_name:
type: choice # Field type: text, choice, list
multiline: true # Enable multi-line (text only)
default: "Default value" # Pre-filled value
placeholder: "Hint text" # Placeholder when empty
values: # Options for choice/list
- Option A
- Option B
vars: # Variable definitions
- name: var_name
type: date # Variable type
params: # Type-specific parameters
format: "%Y-%m-%d"
force_mode: clipboard # Injection mode override
propagate_case: true # Match case of trigger
word: true # Word boundary required
Variable Type Reference
| Type | Parameters | Description |
|---|---|---|
date | format (strftime), offset (seconds) | Current date/time |
clipboard | — | System clipboard content |
shell | cmd (shell command) | Command stdout |
form | layout, fields | Interactive form input |
match | trigger | Nested match expansion |
Global Config Options
File: ~/.config/texpand/config.yml
| Option | Type | Default | Description |
|---|---|---|---|
search_trigger | string | : | Search trigger character |
backend | string | auto | Injection backend |
max_form_width | int | 80 | Maximum form width |
max_form_height | int | 40 | Maximum form height |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error (no match, invalid config, etc.) |