Love Letter to Espanso

Many moons ago, I first heard of Text Expander and although it seemed pretty neat, I had most of the things I typically paste often enough baked into my alfred installation under the “snippets” extensions. In there I have almost every SomaFM station and a command for mpv listed there so all I have to is invoke Tilda (a terminal that appears on top of my desktop with a single keystroke) type a few characters for the channel I’m trying to listen to and paste away.

When I started in Obsidian, I started using a couple of Unicode special characters in my file names to force the sorting to go a certain way. Adding these single characters to alfred just to invoke them by typing “section mark” seemed like way too much work for just a single character. This is when I started to really embrace espanso for what it was. I still use alfred’s snippets but they have their use cases and then so does espanso. I has occurred to me recently that I’ve been using espanso for a couple of years now and I thought it was time to show a peek under the hood of my 256 lines of configurations for this lovely piece of software. This software is an essential step in my everyday workflow and I am eternally grateful for that.

Not only can you set espanso to “expand” normal text for you the same way you can in snippets with Alfred (or a persistent list on your favorite clipboard manager) but it can also do fancy cursor placement, which came in real handy when I started adding quotes to my Obsidian vault.

Below are some of the examples that I espanso for. It might seem like a lot but I have most of these triggers memorized now the same way we all have our keyboard shortcuts memorized.

Below is a list of output from my espanso Triggers to help illustrate how extensively I use it. While some of these might seem unnecessary, keep in mind that they are setup so they are easily triggered while typing quickly in either Obsidian or Todoist or other parts of the Linux environment

Simple Horizontal line

;'

expands to

---

Colon (no Shift)

;;

expands to

:

Quote Citation (fancy cursor placement)

;--

expands to

—  cursorStartsHere

Section Mark

;ss

expands to

§

Paragraph Mark

;pp

expands to

Approximately Equal To

;==

expands to

End of Document

;eo

expands to

Denote the use of AI

;aa

expands to

Crossed out O for Source Links

;uu

expands to

Ø

Source Link (fancy cursor placement)

;src

expands to

[Ø SOURCE]($|$)

(the cursor starts between the two Dollar signs)

for Appending to the TEE command in Terminal

;log

expands to

|& tee -a .md

the cursor starts before the .md so you can start by typing the filename you want to save your log as.

Filler texts I often use

;hw
;lf
;ty
;ls
;lp

expands to

Hello, World!
This space intentionally left blank.
Tyler was here
Reticulating splines...
This page intentionally left blank.

Passwords

The real power is here!

Todoist Specific

;dd
;7

expands to

in 3 days
 7:30p 

MPV terminal commands

;mm
;ms
mpv -no-video -volume=93 
mpv -no-video -volume=93 -shuffle 

Comments for Code

;htm
;css
<!-- cursorStartsHere -->
/* cursorStartsHere */

yt-dlp terminal commands

;myt

expands to

yt-dlp -S +codec:h264 
;mp3

expands to

yt-dlp -x --audio-format mp3 --verbose 

Images on Clipboard

I have several entries setup that contain system file locations of images on my local hard drive. Invoke espanso in an appropriate area and it will put those images into the application as if you just dragged and dropped them there.

Dates Galore

;dte
;ste
;cte
;fte
;mte
;lte
;zte

expands to

04/04/2023 22:55
04-04-2023 2255
2023-04-04
Tuesday, April  4, 2023 22:55 
0404
0404-2255
202304042255

Why don’t you head on over to the espanso website and see if this fine software can’t improve your life as much as it has done for me. ■

OpenPLUTO

Doing it different since 1981.