I avoided using text replacement and expansion programs for a really long time. They're cool in theory, but I didn't necessarily want to get heavily reliant on them and alter my "muscle memory" for doing things. I'm not sure why I changed my mind, but I did one day.
Enter Espanso. It's a text replacement program. It's awesome.
90% of what I use it for is creating repetitive templates. It's much easier and much more efficient to type :prtemplate
than go fetch the PR template from a bookmark. Sometimes I also don't even know what day it is, so :date
keeps me time-honest without needing to use my brain to actually figure out what meaningless calendar marker we're currently living in.
Why
- It works on Windows, macOS, and apparently Linux. Cross-platform was pretty important to me. My work machine is a Macbook but my daily driver is a Windows machine.
- It's all text-based so you can create a repository of your expansions and store them on GitHub. I have a pretty sweet and simple setup that keeps my stuff in sync across machines, for free.
- It can interface with the shell and you can do neat stuff with that. One of my favorites is getting the UNIX epoch time for easily inserting that as a timestamp where necessary.
- trigger: ":epoch"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "date '+%s'"
- It has a bunch of commands for the CLI that are helpful, such as
espanso match list
to get your expansions quickly in your terminal. - It is extremely well-documented, stable, and generally super cool.
- There are also some helpful premade plugins for expansions. Timezone conversion is neat, along with fancy Unicode fractions.
So yeah. I like Espanso a whole lot. It's quite useful and has shaved many seconds off of many small tasks, which is highly enjoyable.