On this page
1. Check that Espanso is running #
Install Espanso through the official route for your platform. On Linux, choose the instructions matching X11 or Wayland. Follow the platform page for required permissions instead of copying installation commands from another operating system.
Open a plain-text editor and type :espanso. The getting-started page says the supplied match should expand to Hi there!. This is a quick way to separate an installation problem from a problem in your new file.
On Linux, you can also check the running status with:
espanso status
If the supplied match fails, correct the installation or running state before adding your own rules. On Windows, launch Espanso from the Start menu. On Mac, follow the official permission instructions if the application reports a security prompt.
2. Find the match folder #
Open a terminal and run:
espanso path
Use the reported configuration directory. Inside it, match holds the snippets and config controls behavior. The configuration reference explains the split.
Create a plain-text file named writing.yml inside match. You can use Visual Studio Code or another editor from our free code editor list. Verify that Windows hasn't added a hidden .txt extension.
Keeping this example in its own file avoids mixing practice rules with your existing library. Espanso's organizing-matches page describes how separate match files are loaded.
3. Create text shortcuts with Espanso for a reply and address #
Paste this original example into writing.yml:
matches:
- trigger: ":wreply"
replace: |
Thanks for reporting the issue.
Please send the page address and the exact error message.
A screenshot of the problem would help us check it.
- trigger: ":waddress"
replace: "Example Studio, 12 Sample Lane, Springfield"
Use spaces for indentation. matches: appears once at the top; each rule begins with a dash at the same indentation level. The | introduces a multiline replacement. Don't paste a second matches: heading halfway through the same file.
Save the file. Espanso normally reloads configuration changes automatically. If it doesn't, the official introduction gives this restart command:
espanso restart
In your plain-text editor, type :wreply. You should see three lines beginning with “Thanks for reporting the issue.” Then type :waddress on another line and check the full fictional address. Check each line and the fictional address before using the rule in another application.
4. Add a Markdown link with a cursor position #
Append this rule under the others:
- trigger: ":wlink"
replace: "[link text]($|$)"
The $|$ marker is a cursor hint. After expansion, the visible text should be [link text]() with the cursor between the parentheses. Enter a sample address there, then edit the label.
The match reference explains that Espanso moves the cursor by simulating left-arrow presses. It warns about multiline replacements in auto-indenting editors. For this example, keep the link on a single line and confirm the cursor position before using it in a longer template.
If your main writing application has its own Markdown snippets, compare that workflow with the system-wide trigger. The Markdown editor shortlist covers editors that may already fit the rest of your writing process.
5. Check the target application #
Try the support reply in the application where you actually write it. Verify line breaks, punctuation and whether the text reaches the intended field. Don't send the practice reply to a customer as part of this check.
If a particular match inserts poorly, Espanso's injection documentation provides a per-match clipboard option:
- trigger: ":wreply"
force_mode: clipboard
replace: |
Thanks for reporting the issue.
Please send the page address and the exact error message.
A screenshot of the problem would help us check it.
Replace the original reply rule with this version; don't leave two copies with the same trigger. Change one thing at a time, then check the exact field again. Clipboard mode is a troubleshooting choice, not a promise that every editor will accept the expansion.
Known problems in real configurations #
Browser completion can interfere with insertion
A June 2025 Zen Browser report described expansions failing in the URL bar. Contributor Stephen Meech explained how browser and search completion can interfere with insertion. The author later traced the change to Zen version 1.11.3b. Clipboard and delay adjustments did not fix their reported setup.
If expansion works in a document but fails in a browser bar, check the current browser version and completion behavior. Try an ordinary text field to isolate the problem. Use supported current software; rolling back a browser solely to restore a shortcut can leave security updates behind.
Tabs and newlines can complicate a code template
In a May 2025 multiline-match issue, a Mac user reported missing content in a template containing newline and tab escapes. A project collaborator suggested clipboard insertion and a more readable multiline block with spaces. The author found a workaround by inserting a space between their newline and tab.
For your own template, begin with the plain multiline block in this guide. Add indentation behavior only after the text expands correctly. A line that looks right in the YAML editor can still be altered by the destination editor's auto-indent settings.
Troubleshooting table #
| Problem | Likely cause | What to check |
|---|---|---|
| Even :espanso doesn't expand | Program isn't running or setup is incomplete | Check status and the official platform instructions |
| One new file fails | YAML structure or filename problem | Check spaces, the single matches heading and the .yml extension |
| Trigger vanishes but text is incomplete | Target field and insertion method conflict | Compare a plain editor with the target field; try per-match clipboard mode |
| Cursor lands in the wrong place | Auto-indentation changes the inserted text | Use a single-line hint or a form for several variable fields |
| Two choices appear for one trigger | More than one loaded rule uses that trigger | Remove the duplicate or intentionally label the alternatives |
Variations for a growing library #
Add a search label
Add label: "Ask for page address and error" to the reply rule at the same indentation level as replace. The search bar uses labels to make matches easier to identify. The official introduction lists Alt+Space, or Option+Space on Mac, as its default opening shortcut.
Group phrases by purpose
Create separate match files for support replies, addresses and writing fragments. Start each file with its own matches: heading. Use readable triggers so a colleague can understand their purpose without memorizing your abbreviations.
Track approved wording
Keep a history of changes with Git if that already fits your workflow. A history helps you identify when a reply changed and restore an earlier version. Review script-backed packages separately from ordinary text phrases before including them in the same library.
Completion checklist #
- The supplied :espanso match works before your custom rules are checked.
- writing.yml is in the reported match directory with a real .yml extension.
- The support reply has three correct lines in the target application.
- The address expands in full and still uses fictional practice details.
- The Markdown link leaves the cursor in the intended position.
- Each trigger has one intended rule, unless alternatives are intentional.
Next steps #
Replace the fictional wording with reviewed phrases from your own work, then add a few shortcuts at a time. For team-owned wording, look at TextExpander before sharing several competing copies of a file. For fragments that stay inside one editor, its own snippet system may be easier to maintain.
Sources #
- Espanso getting started
- Configuration basics and organizing matches
- Injection mechanism and cursor hints
- Zen Browser discussion and multiline discussion
Explore more in Automation
- Browse all Automation websites
- 9 Best Free Clipboard Managers for Desktop Work in 2026
- Best Text Expander Tools for Replies, Templates and Code
- LeechBlock NG vs Cold Turkey: Which Block Fits Your Work?
- World Time Buddy vs Every Time Zone for Meeting Planning
- Super Productivity vs Pomofocus: Tasks or a Daily Timer?




