When espanso breaks on long replacement strings (and how to fix it)

Published: (February 21, 2026 at 08:09 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

TL;DR ☕

If a replacement string longer than 100 characters isn’t expanding, increase clipboard_threshold in ~/.config/espanso/default.yml.

The problem

Long replacement strings ( > 100 chars) can silently fail in Espanso.
Example snippet:

- trigger: ":some-long-snippet"
  replace: "Dear passangers, we have good news and bad news. Good news is we are landing. Bad news is we are crash landing!"

When the trigger is typed, nothing is inserted and sometimes a command‑prompt‑like UI appears.

Why it happens

Espanso’s default configuration contains a clipboard_threshold setting (commented out):

# clipboard_threshold: 100

If the replacement text exceeds this threshold, Espanso aborts the insertion without warning.

How to fix it

  1. Open the configuration file:

    nano ~/.config/espanso/default.yml
  2. Uncomment (or add) the clipboard_threshold line and set it to a higher value, e.g. 500:

    clipboard_threshold: 500
  3. Save the file and reload Espanso (or restart it manually):

    espanso restart

After restarting, long replacements work as expected.

Additional notes

Happy expanding!

0 views
Back to Blog

Related posts

Read more »

Steel Bank Common Lisp

About Steel Bank Common Lisp SBCL is a high performance Common Lisp compiler. It is open source / free software, with a permissive license. In addition to the...