Match Files and Configuration
Directory Structure
~/.config/texpand/
├── matches/ # YAML match files (loaded alphabetically)
│ ├── base.yml
│ ├── git.yml
│ └── emoji.yml
└── config.yml # Global config (optional)
Organizing Match Files
Split your matches into separate files by category for easier management:
# git.yml — Git-related expansions
matches:
- trigger: "git!com"
replace: "git commit -m \"{{msg}}\""
- trigger: "git!pus"
replace: "git push"
- trigger: "git!log"
replace: "git log --oneline --graph"
# emoji.yml — Emoji shortcuts
matches:
- trigger: ":shrug"
replace: "¯\\_(ツ)_/¯"
- trigger: ":tableflip"
replace: "(╯°□°)╯︵ ┻━┻"
Loading Order
Files are loaded in alphabetical order. All matches from all files are combined into a single pool.
te list
# Shows all triggers from all files
Config File Format
The optional ~/.config/texpand/config.yml can contain global settings:
search_trigger: ":"
backend: clipboard
max_form_width: 80
max_form_height: 40
Options Reference
| Option | Type | Default | Description |
|---|---|---|---|
search_trigger | string | : | Character used to trigger search mode |
backend | string | auto | Injection backend (keys, clipboard, evdev) |
max_form_width | int | 80 | Maximum form width in characters |
max_form_height | int | 40 | Maximum form height in characters |
Loading from Custom Directory
Use --config-dir to load from a different directory:
te :hello --config-dir ./my-matches
te list --config-dir /path/to/shared/matches
What's Next
Now learn about Interactive Forms — the signature feature of cli-expander.