How to type faster and increase your productivity with Espanso

If you are a writer, coder, or answer a lot of emails in a day, a text expander is a must-have program on your computer. It’s basically a productivity tool that expands or replaces your typed text with its longer equivalent to help you type faster.

Generally speaking, you will find text expansion tools of all kinds. However, Espanso turns out to be one of the most promising of the lot, as it is free and offers lots of customization options.

Let’s learn about Espanso and explore how you can use it in your workflow.


What is Espanso?

Espanso is a free and open source text expansion tool for Linux, macOS and Windows. It works by parsing the text as you type it into a text field to compare it to its records in the configuration file, and replaces it with its equivalent longer version if there is a match.

How to install Espanso

Espanso is available on all major desktop platforms. If you have a Mac or Windows PC, download the Espanso installer from the links below and run it to install the program on your system.

Download Spanish: the Windows | Mac (Intel), Mac (Apple Silicon)

On the other hand, if you have a Linux box, the installation can be a bit complicated, as you might expect. So, to keep things simple, here’s a breakdown of instructions to help you install Espanso on different Linux distributions.

USE VIDEO OF THE DAY

Ubuntu/Debian

On Ubuntu/Debian, you can install Espanso using a DEB or Snap package. If you prefer to use a DEB package, open the terminal and run these commands:

wget https://github.com/federico-terzi/espanso/releases/download/v2.1.5-beta/espanso-debian-x11-amd64.deb
sudo apt install ./espanso-debian-x11-amd64.deb

Alternatively, to install via Snap, first make sure your system has Snap using this command:

snap --version

If this returns a version number, Snap is installed on your machine. If not, it’s not and you’ll need to install it first, which you can do using our Snap guide.

Once installed, installing Espanso is as simple as running:

sudo snap install espanso --classic --channel=latest/edge

Other Linux Distributions

If you are using another Linux distribution, you can use Espanso’s AppImage to get the program up and running on your computer.

Open the terminal and run the following commands to do this, and you’ll have an Espanso AppImage executable on your system at the end of it, which you can run like any other app:

mkdir -p ~/opt
wget -O ~/opt/Espanso.AppImage 'https://github.com/federico-terzi/espanso/releases/download/v2.1.5-beta/Espanso-X11.AppImage'
chmod u+x ~/opt/Espanso.AppImage
sudo ~/opt/Espanso.AppImage env-path register

Registering Espanso as a systemd service

With Espanso installed, you now need to save it as systemd service. This allows Espanso to launch automatically at system startup, so you don’t have to worry about doing it manually every time your computer starts.


To register Espanso as a systemd service, run:

espanso service register

If you don’t want to do this, you can start Espanso using the following command:

espanso start --unmanaged

To stop it, run:

espanso stop

On Mac and Windows, you won’t need to do this. Instead, you will need to select the option to Start Espanso at startup (or equivalent) in the installation wizard.

The basics of Spanish

Before you jump in and start using or setting up Espanso, here are some Espanso concepts you should know:

  • Trigger: This is the keyword (letter or word) that Espanso tries to match in its configuration file and replaces it with its longer equivalent (i.e. the replacement text) when there is has a match.
  • Replacement text: It’s the longest text snippet that replaces its equivalent trigger as you type it.
  • Match: It’s basically a key-value pair that associates a trigger with its replacement text. Often it is set using a rule, which you can create yourself or download using packages.


Espanso uses two types of matches: static and dynamic. A static match is constant and ideal for situations that do not require active/dynamic values. On the other hand, a dynamic matching changes depending on the context and therefore is best suited for dynamic text expansions, i.e. when values ​​(or replacement text) are variable.

For example, here is an example of a dynamic Espanso match that replaces instances of :Date with April 6, 2022:

- trigger: ":date"
replace: "April 6, 2022"

How to use Espanso

With the basics out of the way, you can now start using Espanso on your computer. Its use is quite simple: you just have to type : (colon) followed by a trigger, after which Espanso will parse it and replace it with its replacement text if there is a match.

For example, in its simplest form, Espanso can help you automatically fill in the current date in a text field. So, rather than entering the date manually, you can enter its trigger instead, and Espanso will replace it with the actual date.

Configure Espanso to include more matches

As you know by now, for Espanso to work, it is important to have matches in its configuration file. But it turns out that Espanso doesn’t have many matches in that file by default, so you can’t do much with it.

Luckily, populating the matches in Espanso’s config file is pretty straightforward. It requires you to edit a YAML file, which uses a simple syntax and is quite easy to edit. Or, if you’re feeling lazy, you can download an Espanso package instead, which includes a series of similar match types for a specific requirement created by the community, to extend its functionality.

1. Manually create mappings with the configuration file

Espanso stores the YAML configuration file in different directories depending on the operating system. Here’s where you’ll find it on:

  • Linux: /home/user/.config/espanso/
  • MacOS: /Users/user/Library/Application Support/espanso/
  • The Windows: C:UsersuserAppDataRoamingespanso

Use the cd command in the terminal followed by the directory path to navigate to it. You can also use the ls command (on Linux and macOS) to list files and directories in a directory.

Alternatively, you can open the terminal (on Linux and Mac) and run the following command to find spanish way:

espanso path

In Windows, open the File Explorer and access the Spanish folder under: C:UsersuserAppDataRoaming

Inside of Spanish file, you have a configuration folder and a match case. the configuration folder stores all essential settings and behavior options for Espanso, while the match folder contains all correspondence.

It’s the match folder that contains the base.yml, to which we need to add matches. Here’s how.

On Linux or macOS, once you have accessed the match folder inside the Spanish directory, open the base.yml using:

nano base.yml

In Windows, you can access the match folder, right click on the base.yml file and select Open with Notepad to open it.


configuring Espanso matches

Once inside the base.yml file, follow the syntax below to create a match:

-trigger: ":muo"
replace: "MakeUseOf"

Useful Spanish Matches

1. Fill in the email address

-trigger: ":email"
replace: "xyz@gmail.com"

2. Correct a misspelled word

-trigger: "propogate"
replace: "propagate"

3. Enter the current time

-trigger: ":now"
replace: "It's {{mytime}} "
vars:
- name: mytime
type: date
params:
format: "%H:%M"


4. Expand a text snippet

-trigger: ":ilu"
replace: "in lieu of"

To capitalize the first word, use

-trigger: ":ilu"
replace: "in lieu of"
propagate_case: true

5. Print a greeting

-trigger: ":greet"
replace: |
Best Regards,
XYZ

Right here, | is used to add alt text that spans multiple lines

6. Add an image

-trigger: ":image"
image_path: "/path/to/image/"

Of course, these are just a few examples of what you can do with Espanso, and there are various other use cases where the program can come in handy. To verify Espanso Documentation to learn more.

2. Using packages to extend Espanso functionality

Head to Hub Espanso to discover all the different packages created by the Espanso community. When you find a useful package, click on it to access its details. You will also find instructions for installing and using this package.


spanish hub

Open terminal or command prompt and run the install command to install the package on your system. Once installed, enter its trigger keyword in a text field to check if it works.

Do more with Espanso

Even though a text expander might not seem important to you at first or might seem like overkill (since it needs to be configured before you can use it), it’s definitely a valuable tool that can help you type faster and be more productive.

We hope this guide gives you a quick introduction to help you get started with Espanso, so you can include it in your workflow and get more done on your computer. Plus, if you’ve never used text expanders before and want to learn more about them to find out if they’re worth it, we’ve got you covered.


Text extension on a clock

What is Text Expander and how can it help you type faster on Mac?

Read more


About the Author


Source link

Steven L. Nielsen