2025.03.10 (μ›”)

✨ GPT Summary γ€€

A brief summary of how to set up and use text autocomplete with Espanso.

Introduction

To briefly explain Espanso, it is an app like this:

espanso-0.gif

In other words, Espanso is an open-source snippet expansion tool that lets you automate repetitive text input.

How to Use It

  1. Go to the official Espanso website and follow the installation method for your operating system.
    • macOS users can install it easily with Homebrew. espanso-1.png
  2. Check the location of Espanso’s configuration file (Config Path), then open it in a text editor.
    • In this example, I use VSCode to edit the configuration file. espanso-2.png
  3. Register keywords and autocomplete content for your own environment and customize them.
    • You can freely configure anything from simple text replacement to more complex snippet autocomplete. espanso-3.png

Below are the changes made to the espanso/config/default.yml file.

toggle_key: OFF
search_shortcut: ALT+SHIFT+SPACE
# search_shortcut: ALT+SPACE is set as the default value.

Below are the changes made to the espanso/match/base.yml file.


matches:
  # Simple text replacement
  - trigger: ";jd"
    replace: "judicious210"
  - trigger: ";@g"
    replace: "@gmail.com"

  - trigger: ";ye"
    replace: "https://www.youtube.com/embed/"

  - trigger: ";rt"
    replace: "Thank you"

  # Print the current date
  - trigger: ";d"
    replace: "{{mydate}}"
    vars:
      - name: mydate
        type: date
        params:
          format: "%Y.%m.%d"

  # Print the output of a shell command
  - trigger: ":test"
    replace: "{{output}}"
    vars:
      - name: output
        type: test
        params:
          cmd: "echo 'Hello World!'"

References

For more detailed guides, refer to the resource below.

Leave a comment