Skip to main content

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

TypeParametersDescription
dateformat (strftime), offset (seconds)Current date/time
clipboardSystem clipboard content
shellcmd (shell command)Command stdout
formlayout, fieldsInteractive form input
matchtriggerNested match expansion

Global Config Options

File: ~/.config/texpand/config.yml

OptionTypeDefaultDescription
search_triggerstring:Search trigger character
backendstringautoInjection backend
max_form_widthint80Maximum form width
max_form_heightint40Maximum form height

Exit Codes

CodeMeaning
0Success
1General error (no match, invalid config, etc.)