📝 Expand text with my favorite tool, Espanso!
By goz
Automatic text expansion is one of those things that you don’t understand how useful it is until you are on a machine without it.
What is automatic text expansion
Automatic text expansion is a utility that runs in the background and expands a short piece of text to a longer piece of text.
For example, I have ;d;
set up to expand to the current date, for example 2022-08-28
.
I use this shortcut when I’m naming files I’m working on, or other places where I may need today’s date.
Another one I use is to expand the meta information on a blogpost such as this one.
I can open an editor and type ;meta
, which will expand to the following
---
Title: ""
Author: goz
Date: 2022/08/28 13:21
Slug:
Category:
Tags:
Status: draft
Summary: ""
featured_image: ""
images: [ "" ]
---
Yes, there are apps that let you expand text within that app, but by using an utility that is running all the time, I can use the expansions in any app. I like to bounce between different browsers and editors, using an application for text expansion means I only have to remember one set of expansions, not how each application may do text expansions.
Starting with TextExpander
Once upon a time I was checking out automatic text expansion with TextExpander. This worked really well, but then removed the ability to sync your expansions in Dropbox along with introducing a subscription model, so I started looking for something else. That’s when I came upon Espanso.
Espanso
Espanso runs on Windows, Linux, and Macs. The application is open source, licensed under the GPL 3 license. The expansions are stored in regular text file. I sync my expansions using git and a private repo on GitHub. Since I use 2 or 3 different computers in a day, Git allows me to keep all of my expansions in sync.
There are three types of expansions that I use:
- Regular text expansions: Replacing short text with longer text. One expansion is
;em
, which expands togoz@gozgeek.com
. There is also;o;
which expands to the degree symbol(°). - Calculated text expansions: Replacing short text with the output of shell commands.
;tom
usesecho
anddate
to calculate tomorrow’s date and expand out the text to readtomorrow, August 29
. - Emoji: There is an addon pack to let you type emoji’s in text, like expanding
:wink:
to 😉. It’s usually faster than using the emoji picker.
A lot of their examples use the colon as the start of the shortcut. It doesn’t have to be a colon, it can be whatever you want as long as it is unique. I use the semicolon to start a lot of my snippets because I didn’t like having to use the shift key to type the colon.
Espanso rocks
Espanso is such a great program. It’s so good that I sponsor the project, and that says a lot! My main complaint is thatI can’t use it on a Chromebook, but that’s pretty minor in the grand scheme of things. If you’re looking for an easy way to be more productive, be sure to check out Espanso.