Skip to content

Tips on usage

Context menus

There are several context menus:

  • In the editor window the context menu covers the standard editing functions. It also includes a submenu for creation of Espanso match types.
  • There is a context menu to add a new match at the cursor. This menu can be invoked with the keyboard shortcut Ctrl+J or by clicking the Add Match button on the lower toolbar.
  • In the gutter on the left edge of the editor windows there is a contest menu with options to fold or unfold trigger blocks.
  • Over the file tab the context menu has a range of close and save options plus an option to copy file path or show file in folder.
  • Over the treeview of triggers the context menu enables sorting by name or per file.
  • Over the main toolbar the context menu includes a toggle for display of button captions and another for display of small (16x16) or standard(24x24) icons.

File format

EspansoEdit includes a filter so that only YML files are displayed in the file list. When the default folder is active the file list includes the match files from the $CONFIG/match folder. These files make up the base match set. Note that EspansoEdit displays files starting with an underscore even though these are not automatically loaded by Espanso (see organizing matches).

Espanso also uses YML files for configuration files. The parent folder of the default folder contains the config folder, in which the file default.yml is found. This is the default configuration file - for more details refer to configuration basics in the Espanso documentation.

By default Espanso syntax highlighting is applied to YML files and new (untitled) files. On saving a file to one of the other supported file types (Markdown, batch or PowerShell) the relevant syntax is applied.

Create new matches

A right-click in the editor window shows the context menu, which includes creation of new Espanso matches. A new match may be either inserted at the current caret position or added at the end of the current file. Insertion can also be invoked with the keyboard shortcut Ctrl+J or by clicking the Add Match button on the lower toolbar. The options for both add and insert include:

  • Basic (static) trigger
  • Clipboard trigger
  • Date trigger
  • Form with choice box
  • Form with list box
  • Regex trigger
  • Script trigger
  • Shell trigger
  • Variables trigger
  • Word trigger

Selection of one of the match types creates the match structure for you to complete.

Code folding

Code folding is based on basic and regex triggers. For a comment to appear within the fold of a trigger it must be below the trigger - for example:

- trigger: ":shell"
# Shell command output

Single line matches are not folded and are best grouped either above or below other matches.

Incremental search (search as you type) can be performed in the current file. Use the keyboard shortcut Ctrl-E to invoke incremental search. The search term will then appear highlighted progressively in the editor window as you type. Press Esc to exit incremental search.

Find in files

Use the find panel at the bottom left of the main window to search for a word or phrase across all YML files in the active folder. Files containing the search term are listed. Clicking on a file will open it in the editor with the first search hit highlighted. The F3 key can then be used to highlight and move between other matches in the same file.

Find from command line

To find text from the command line use the /fem switch. For example, to find ‘abc’:

%localappdata%\Programs\EspansoEdit\EspansoEdit.exe /fem abc

This command will start EspansoEdit and list the file(s) containing ‘abc’. If EspansoEdit is already running the text is also found providing the setting to restrict EspansoEdit to a single instance has not been applied.

Portable Espanso

The Tools menus includes an item to set the active folder to the folder used by Espanso portable. This item involves a check on the path to the running Espanso process and another check for the subfolder .espanso\match. The Packages menu is set to the portable folder .espanso\match\packages.

Espanso stats

The stats dialog provides summary information about YML files in the active folder. Stats include numbers of:

  • Files (with line and character count)
  • Triggers (total with breakdown to text and Regex triggers)
  • Forms
  • Lines
  • Characters


The backup function creates a ZIP file with date and time stamp that contains all YML files in the active folder.

Editor settings

The dialog for editor settings allow you to:

  • Show line numbers on the left side of the editor
  • Set the program so that files open on last exit are re-opened in the editor on startup
  • Show a vertical line at the right margin
  • Set the position of the right margin
  • Word wrap lines at the edge of the editor window or at the right margin
  • Set the size of tabs and block indents
  • Toggle hints for Espanso reserved words
  • Highlight the current line
  • Toggle display of path of current file in titlebar
  • Toggle restriction of EspansoEdit to a single instance only
  • Set editor background color
  • Select the editor font from your installed fonts
  • Specify font size