Jake VanderVaate

Text expansion

Writing can be time consuming, and repeating information can be frustrating. Dates, long words, commonly mis-spelled words, and acronyms can slow writing down.

Text expansion software offers a solution that lessens the effort between mind and “paper” (text on your screen). Rather than typing out long strings of text, text expansion software can interpret shorter, user-defined strings and “expand” them into the desired output.

Triggering text expansions

I’ll discuss software solutions later, but this section will discuss how I trigger most of my expansions. I use a couple different methods, depending on the text I want to expand.

Text expansions are composed of a “string” of characters that precede a “trigger” character. The string can be any characters you would normally type on a keyboard. I usually use spaces and punctuation marks as my trigger characters.

Type a string then its trigger character and you’ll get your text expansion.

“Normal” strings

For the sake of this writing a “normal” string is just a word as it would normally be typed. “cat”, “dog”, or “fish” would all be normal strings under this definition.

Normal string expansions are generally limited to strings of text that don’t make an actual word.

For example, I wouldn’t want to use the “info” to expand to “information” because “info” is a word I might actually use. Instead I use “inf” to expand to “information”, since “inf” isn’t a word or abbreviation I would normally use.

These are some of my most common expansions:

All of these work because I never use the abbreviation by itself. Furthermore, they are also easy to remember (especially for anyone who has ever sent a text before 2007).

“Trigger” punctuation

Some strings probably shouldn’g be expanded by themselves. “Date” can’t be used to expand to display [today’s date] because you might just want the word “date”.

Using a punctuation mark at the beginning of the word offers a solution to this problem.

I use a semicolon for my expansions that start with a trigger punctuation character for a couple of reasons:

Here are some examples:

Text expansion software

Your computer’s operating system dictates what software you can use for text expansion.

Windows

AutoHotkey is the most comprensive soltution for Windows, and is also its own scripting language.

An expansion like what I wrote about above would look like this in Autohotkey:

::bc::because
::;site::https://jakevandervaate.com

Since AutoHotkey is a scripting language you can also create more advanced pieces of code. Here is how I handle use “ymd” to send today’s date in the ISO-8601 YYYY-MM-DD format:

:*:ymd::
    FormatTime, Date,, yyyy-dd-MM
    Send, %Date%
return

That is a simple example, but the documentation offers many more examples and possibilities.

Linux

AutoKey seems to be the best solution for Linux users that use the XORG display server.

Autokey is written in Python, and provides an easy to use graphical user interface (GUI) to set expansions.

A date script, like my Windows/AutoHotkey example would look like this:

import datetime
x = datetime.datetime.now()
output = x.strftime("%Y-%m-%d")
keyboard.send_keys(output)