Espanso: Because Who Actually Likes Typing Out Their Emails?

TL;DR

Espanso is a text expander tool that will save you lots of repetitive typing. For real.

Ever had to repeatedly type your email address into a form? Check.
How about your name? Surname? Email signature? Check. Check. Check.

Well, instead of risking a typo — like sending that standout job application with the wrong email, and they never get back to you (even though you were certain you were the top pick among the multitude of MAANG folks recently let go—oops, went on a tangent there for a sec 🙂) — how about simply typing ;em and watching it magically expand into your email?

Why Espanso?

I’m in no way affiliated with them, but kudos must be given where due.

Sure enough, there are tools like TextExpander, but Espanso stands out because it’s open source.

Installation

Espanso is cross-platform, with binaries for Windows, Mac, and Linux. I’m sure anyone can find their way around their Installation page: https://espanso.org/install/. If you’re on a Mac and using brew, you can also install it from the command line: brew install espanso.

Accessibility

To use Espanso on a Mac, you’ll need to grant Accessibility access via System Preferences → Security & Privacy → Privacy → Accessibility.

Configuration

On a Mac, the Espanso config folder usually lives at ~/Library/Application\ Support/espanso. The config folder is for Espanso settings, while the match folder (which contains the base.yml file) is where your triggers and replacements should go.

Example

Just as an example, this is how mine looks like (feel free to take the logic behind emojis):

# espanso match file

# For a complete introduction, visit the official docs at: https://espanso.org/docs/

# You can use this file to define the base matches (aka snippets)
# that will be available in every application when using espanso.

# Matches are substitution rules: when you type the "trigger" string
# it gets replaced by the "replace" string.
matches:
# signatures
  - trigger: ";n"
    replace: "Nikola"

  - trigger: ";b"
    replace: "Brežnjak"

  - trigger: ";li"
    replace: "https://www.linkedin.com/in/nikola-bre%C5%BEnjak-892b9a24/"

  - trigger: ";sn"
    replace: "Kind regards,\nNikola Brežnjak\nhttp://www.nikola-breznjak.com/blog"

  - trigger: ";web"
    replace: "http://www.nikola-breznjak.com/"

  - trigger: ";em"
    replace: "[email protected]"

## git
  - trigger: ";ga"
    replace: "git add ."

  - trigger: ";gb"
    replace: "git branch"

  - trigger: ";gc"
    replace: "git commit -m "

  - trigger: ";gd"
    replace: "git diff --color "

  - trigger: ";gf"
    replace: "git fetch --all"

  - trigger: ";gi"
    replace: "find . -name '.DS_Store' -type f -delete"

  - trigger: ";gl"
    replace: "git log"

  - trigger: ";gp"
    replace: "git push origin main"

  - trigger: ";gs"
    replace: "git status"

  - trigger: ";gt"
    replace: "git remote -v"

  - trigger: ";gu"
    replace: "git pull origin main"

## blog
  - trigger: ";bimp"
    replace: "https://nikola-breznjak.com/blog/books/want-improve-read-books/"

  - trigger: ";brem"
    replace: "https://nikola-breznjak.com/blog/miscellaneou/make-remote-developer/"

## emojis
  - trigger: ";eew"
    replace: "⚠️"

  - trigger: ";eet"
    replace: "🤔"

  - trigger: ";eeb"
    replace: "💰"

  - trigger: ";eem"
    replace: "💪"

  - trigger: ";eetm"
    replace: "™"

  - trigger: ";eeh"
    replace: "❤️"

  - trigger: ";eeu"
    replace: "👍"

  - trigger: ";eep"
    replace: "🙏"

  - trigger: ";eef"
    replace: "🤦"

  - trigger: ";ees"
    replace: "🙂"

  - trigger: ";eeg"
    replace: "😎"

  - trigger: ";eev"
    replace: "👋"

  - trigger: ";eel"
    replace: "😂"

  - trigger: ";eec"
    replace: "👏"

  - trigger: ";eeo"
    replace: "✅"

  - trigger: ";eer"
    replace: "🚀"

  - trigger: ";eex"
    replace: "⏭️"

## replies
  - trigger: ";ryw"
    replace: "You’re welcome 👍"

  - trigger: ";rlmk"
    replace: "Please let me know 👍"

  - trigger: ";rbtw"
    replace: "Btw, how are things on your end?"

  - trigger: ";rt"
    replace: "Thank you! 👍"

## misc
  - trigger: ";fd"
    replace: "firebase deploy"

  - trigger: ";wed"
    replace: "Happy Wednesday (a dy on which, historically, most people wed on - thus: Wed nes day). Not really, but it would be a fun fact actually 🙂"

  - trigger: ";cl"
    replace: "console.log("

  - trigger: ";se"
    replace: "select * from "

  - trigger: ";o"
    replace: "open ."

  - trigger: ";im"
    replace: "![]({{clipb}})"
    vars:
      - name: "clipb"
        type: "clipboard"

  - trigger: ";ch"
    replace: "chrome://history"

  - trigger: ";;c"
    replace: "code ."

Beyond the Basics: Advanced Configurations

As you can see above, you can create simple trigger/replace combinations, but also in example of the ;im trigger to insert an image directly from the clipboard in Markdown format.

They even support plugins, and there’s one for all the emojis you’d ever want, and the installation is straightforward.

Conclusion

Espanso is more than a tool; it’s a testament to the open-source community’s ability to create solutions that are both powerful and accessible. I wholeheartedly recommend you give it a try.

If you’re also using Espanso, and have some great tips to share, please leave them in the comments.

Thanks for reading, and hope it was useful 👋

Written by Nikola Brežnjak