28 C
Jaipur
Wednesday, October 28, 2020

Use Espanso Text Expander To Save Time And Increase Productivity (Linux, Windows, macOS)

Must read

How To Fix Chromium-Based Web Browsers Not Working Properly After Resume From Suspend On Linux

This article explains how to fix Chromium-based web browsers (Google Chrome, Chromium, Vivaldi, Opera, etc.) not working properly after resuming from suspend on Linux. Those...

Pixel 5 Users Report Issues When Phone is Docked on Pixel Stand

A number of Pixel 5 users are reporting a bizarre issue that apparently affects the device when left overnight on the Pixel Stand. According...

How To Auto Delete Your Facebook Account After Your Death

The Facebook account of a person who has passed away can be memorialized after a request submitted by a verified person. However, Facebook also...

Espanso is a free and open source text expander written in Rust, available for Linux, Windows and macOS. It uses a file-based configuration, with no graphical user interface (it has a minimal tray icon on Windows and macOS). It features support for most applications, custom scripts, code snippets, Emoji, and it can be extended through extra packages.

On Linux, the application runs on X11 only. The developer says that supporting Wayland is a possibility in the future, but it will take a while (you can track this bug to see when Wayland is supported).

A text expander is a tool that detects when you type a predefined (short) keyword, and replaces it with something else. This can boost your productivity, by quickly inserting long phrases you type frequently, code snippets, and more, in almost any application. Thanks to this you can save a lot of typing, insert snippets that work system-wide, and so on.

This is a demo in which I’m using Espanso to expand a short keyword into https://www.linuxuprising.com:

Espanso text expansion demo gif

Espanso text expander features:

  • Works on Windows, macOS and Linux
  • Works with almost any program
  • File-based configuration (YAML syntax)
  • Supports application-specific matches
  • Supports multiple triggers to expand the same match
  • Works with Emojis
  • Works with Images (can replace an abbreviation with an image)
  • Date expansion support
  • Custom scripts support (written in any language)
  • Shell commands support
  • Clipboard support (can use the current clipboard contents in a match)
  • Expandable with packages
  • Built-in package manager, and a hub for installing extra packages for extending Espanso’s functionality
  • Shortcut to toggle text expansion on / off by quickly double pressing the ALT key (Option on MacOS); a desktop notification is displayed when Espanso is paused / unpaused


Espanso can be useful in many cases. For example, use it to replace :addr with your complete address, or to replace commonly misspelled English words (with the help of the mispell-en package that you can install using espanso install misspell-en --external followed by espanso restart), and other simple substitutions.

You can also use it in more advanced ways, like inserting a tag with the cursor positioned anywhere in the expanded text (see
Cursor Hints), for example in the middle of a <div></div> tag. You may also call external scripts written in any language, and use the script output in a match. Or, thanks to its shell extension, you can use the output of some commands in a match, with support for Bash pipes.

In the future, Espanso will come with a cross-platform graphical user interface (written in Qt), although users will not be forced to use it, so you’ll be able to continue using it without a GUI. The developer noted that the GUI is about halfway done at the end of April, and that the estimated remaining time back then was 2 to 6 months.

Other planned features, but with a lower priority, are Espanso for Android, Espanso Sync (synchronize Espanso configurations between devices with built-in cloud sync; synchronization using symbolic links is already possible), and an improved Espanso Hub (this is used for installing extra packages to extend Espanso).

Quick comparison with AutoKey


Some of you may wonder how Espanso compares to AutoKey, a GUI tool for desktop automation on Linux which supports text expansion (and more). While similar in some ways, there are also quite a few differences between these two applications.

Let’s start with the obvious differences. Espanso is cross-platform, so you can use the same configuration on Linux, Windows and macOS (and sync it with symlinks), while AutoKey runs on Linux only. Also, Espanso currently doesn’t come with a GUI, while AutoKey has a graphical user interface (available using either GTK or Qt).

Another difference is that AutoKey supports custom scripts written in Python only, while Espanso supports custom scripts written in any language (and shell commands). Yet another difference is the possibility of expanding Espanso through packages. Espanso also has some minor extra features that aren’t available in AutoKey, like its cursor hints feature, which lets you position the cursor inside the match, or it’s built-in support for expanding matches into images (you can probably also do this using AutoKey thanks to its Python API, but you’ll need to write the code yourself).

AutoKey has some advantages over Espanso too. Like the ability to use not only an abbreviation to trigger a text expansion, but also a hotkey, a feature that Espanso is currently lacking. Also, AutoKey can automate mouse clicks, and manipulate the desktop and windows (like activate or close windows, switch to a different desktop, wait for a window to exist or to have focus, etc.), something that Espanso lacks.

I don’t know which one is better. It depends on what you want from a text expander, and if you want to do more than text expansion. You decide which one is best for you / your use case.

Download Espanso Text Expander

Espanso is available to download as an installer for Windows, and it’s available on Homebrew for macOS.

On Linux, the application is available in the Snap store, and as a DEB package for Debian and Ubuntu-based Linux distributions, including Linux Mint, Pop!_OS, Zorin OS, Elementary OS, and so on. There are also AUR packages available (latest stable, precompiled binary and latest Git master branch) for Arch Linux and Manjaro.

There’s a generic Linux binary available for installation as well, but you’ll have to manually install the dependencies if you use this.

All the information you need to install Espanso on Linux is available on its Linux Install page.

Once you have Espanso installed, check out its Getting Started guide, and for more advanced usage see all the available Matches (matches define the substitutions performed by Espanso). You may also want to install some extra packages from the Espanso Hub.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How To Fix Chromium-Based Web Browsers Not Working Properly After Resume From Suspend On Linux

This article explains how to fix Chromium-based web browsers (Google Chrome, Chromium, Vivaldi, Opera, etc.) not working properly after resuming from suspend on Linux. Those...

Pixel 5 Users Report Issues When Phone is Docked on Pixel Stand

A number of Pixel 5 users are reporting a bizarre issue that apparently affects the device when left overnight on the Pixel Stand. According...

How To Auto Delete Your Facebook Account After Your Death

The Facebook account of a person who has passed away can be memorialized after a request submitted by a verified person. However, Facebook also...