Get AI summaries of any video or article — Sign up free
Text expansion in Obsidian with Espanso thumbnail

Text expansion in Obsidian with Espanso

5 min read

Based on Nicole van der Hoeven's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Espanso provides system-wide text expansion across Linux, Windows, and macOS, so shortcuts work in any app where typing occurs.

Briefing

Text expansion in plain-text, cross-app shortcuts is the practical upgrade that makes heavy typing feel manageable—especially inside Obsidian workflows. Espanso, a free open source tool, lets frequent phrases, links, templates, and even conditional text be triggered by short keystrokes anywhere on a computer (not just inside Obsidian). The biggest differentiator is how it’s configured: all settings live in editable plain text files, which can be version-controlled with GitHub and shared across machines.

That plain-text setup matters because it turns personal “typing automation” into something portable and maintainable. Espanso supports Linux, Windows, and macOS, and its configuration can be located via a command that prints the local configuration path. From there, users can open the configuration directory and edit files directly—no proprietary UI required. The configuration is split into a general config area and a match area. The match folder holds the actual expansion rules, and the speaker uses Git ignore patterns to avoid pushing private configuration (like contact details or other sensitive entries) to a remote repository.

At the core of Espanso are “matches,” which pair a trigger with an output. A basic match replaces what the user types (often a short token such as a word or keystroke sequence) with a longer phrase. The speaker’s style uses a semicolon prefix as a deliberate trigger so normal typing won’t accidentally expand. Examples include contact blocks (typing “;NVDH” expands to a full name), social links (e.g., “;me.gh” for a GitHub URL), and affiliate links (typing “;aff.Napkin” inserts a specific affiliate URL). Emojis and Obsidian-specific snippets also get treated as expansions, so the same shortcut works in any app—flags, theme links, and formatted “Obsidian” references.

Beyond simple replacements, Espanso supports richer match types. “Extensions” can pull in dynamic content such as dates, reuse clipboard text, offer multiple choices, randomize outputs, or run scripts. The speaker uses a date trigger that inserts today’s date using configurable formatting, including an Obsidian-friendly variant that wraps the date in brackets. For more controlled messaging, “regex triggers” let expansions depend on patterns rather than fixed text. That’s used to refuse sponsorships with a templated response: the typed product name is captured and injected into a prewritten explanation. A similar regex-based approach handles tool inquiries for PKM apps by inserting a response that asks vendors to confirm which requirements are met.

The speaker also addresses why not to rely on Obsidian-only solutions. Obsidian plugins for text snippets exist, but they don’t help in email, chat, YouTube comments, or other apps. Espanso’s value is that it works system-wide, so the same shortcuts apply everywhere. Compared with Text Expander, Espanso’s open source, free model and file-based configuration are presented as key advantages.

Overall, the workflow is about reducing friction: automate the repetitive parts of communication and writing so attention stays on the meaningful work—while keeping everything organized, shareable, and easy to evolve through version-controlled plain text.

Cornell Notes

Espanso is a free, open source text expansion tool that triggers replacements from short keystrokes across any app (not just Obsidian). Its configurations are stored in plain text files, making them easy to edit, share, and version-control with GitHub. The speaker organizes “matches” by splitting general config from match rules, using triggers like a semicolon prefix to avoid accidental expansions. Basic matches handle contact info, links, emojis, and Obsidian snippets; extensions add dynamic content like formatted dates; regex triggers enable pattern-based templated replies (including sponsorship/tool refusal messages). The result is a portable, cross-platform shortcut system that reduces repetitive typing and supports consistent communication.

Why does storing Espanso settings in plain text files change how people can manage text expansion?

Because every expansion rule and setting lives in editable text files. That means users can open and modify configuration directly in any editor/IDE, and they can treat the setup like code—version-control it with Git/GitHub, back it up, and revert changes when needed. It also makes sharing straightforward: sending the configuration file lets another person reuse the same triggers, outputs, and shortcuts on their own system.

What is a “match” in Espanso, and how does the trigger/output model work in practice?

A match pairs a trigger with an output. When the user types the trigger (often a short token or keystroke sequence), Espanso replaces it with the configured text. The speaker commonly uses a semicolon prefix (e.g., “;NVDH”) so normal typing won’t accidentally expand. In Obsidian, typing “;NVDH” expands into a full name; similarly, “;me.gh” inserts a GitHub link.

How do “extensions” differ from basic trigger-replacement matches?

Extensions support dynamic behavior beyond a fixed replacement string. Instead of only inserting static text, they can compute values (like today’s date with a chosen format), reuse clipboard content, present choices, randomize outputs, or run scripts. The speaker’s most-used extension is a date insertion rule that formats the current date for Obsidian, including a variant that wraps the date in brackets.

How do regex triggers help with templated refusals that still include user-provided details?

Regex triggers let the expansion capture what the user typed and inject it into a larger template. For sponsorship refusals, the user types a product name after a semicolon trigger; the regex-based replacement then inserts that product name into a prewritten message explaining why the endorsement isn’t a fit. The same pattern supports tool-related replies for PKM apps by inserting the app name into a structured response with requirements.

Why does the speaker prefer Espanso over Obsidian-only snippet plugins?

Obsidian plugins for snippets are limited to Obsidian’s environment. If someone needs the same expansions in email, YouTube comments, Discord, or other apps, those Obsidian-only shortcuts won’t work. Espanso runs system-wide, so one shortcut set applies everywhere the user types.

What practical workflow does the speaker use to keep the configuration organized and safe?

They split configuration into a general config folder and a match folder containing the expansion rules. They also use a gitignore approach to avoid pushing private configuration files to a remote repository on GitHub. That keeps sensitive entries (like private contact details) local while still letting public shortcuts be shared.

Review Questions

  1. How does using a semicolon prefix as a trigger reduce accidental text expansions, and what kinds of entries benefit most from that approach?
  2. What capabilities do extensions add that basic matches don’t, and how would you design a date-based expansion for a specific writing workflow?
  3. In what situations would regex triggers be more useful than fixed trigger-replacement rules, and what information can regex-based templates incorporate?

Key Points

  1. 1

    Espanso provides system-wide text expansion across Linux, Windows, and macOS, so shortcuts work in any app where typing occurs.

  2. 2

    All Espanso configuration is stored in plain text files, enabling easy editing, portability, and Git/GitHub version control.

  3. 3

    Espanso “matches” pair triggers with outputs; using a deliberate trigger pattern (like a semicolon prefix) helps prevent accidental replacements.

  4. 4

    Basic matches can automate contact blocks, links, emojis, and Obsidian-specific formatted snippets.

  5. 5

    Extensions support dynamic behavior such as inserting formatted dates, using clipboard content, offering choices, randomizing outputs, or running scripts.

  6. 6

    Regex triggers enable pattern-based templated responses that can incorporate user-provided details (e.g., product names in refusal messages).

  7. 7

    Espanso is preferred over Obsidian-only snippet plugins when the same expansions are needed in email, chat, and other non-Obsidian contexts.

Highlights

Espanso’s configuration lives in editable plain text files, making personal shortcut libraries portable and version-control friendly.
A semicolon-prefixed trigger scheme lets frequent phrases expand reliably without interfering with normal typing.
Regex triggers can capture what someone types (like a product name) and embed it into a structured, prewritten response.
Date extensions can insert today’s date in formats tailored for Obsidian workflows, including bracketed variants.

Topics