Skip to main content

Move your snippets from Espanso or TextExpander without retyping

Bring an Espanso match file, a TextExpander CSV or a spreadsheet into CMDglows: what carries over, what is left out on purpose, and how to export your library back.

Avatar of Diane
CMDglows article cover about importing snippets from another text expander
  • Changing text expander usually means retyping years of snippets, so most people never switch.
  • CMDglows reads Espanso match files and CSV exports, shows what it will import before writing anything, and never runs a command.
  • This article covers what carries over, what stays behind and why, and how to keep an exit door with a readable JSON export.

You have two hundred snippets in Espanso, or a TextExpander library built over years. The tool you want to try looks better, but retyping everything is out of the question. So you stay where you are, even when the old tool no longer fits.

A library you cannot take with you is a lock. CMDglows reads the formats you already have, and lets you leave with your data the same way.

What you can import

CMDglows does not open the file for you and does not connect to your old tool: you copy the text of the file and paste it. It takes a minute:

  1. Open the file in Notepad (or any text editor).
  2. Select everything with Ctrl+A, then copy with Ctrl+C.
  3. In CMDglows, open Snippets, then the ⋯ menu and Import snippets.
  4. Paste with Ctrl+V in the box. Repeat for each file if your library is split across several.

CMDglows recognizes three formats on its own:

  • An Espanso match file (base.yml or any file that starts with matches:). Each trigger becomes a snippet. A match with several triggers gives one snippet per trigger, and the label is kept.
  • A CSV file: a TextExpander export, or any spreadsheet saved as CSV. Commas, semicolons (French Excel) and tabs all work. If the first row names the columns (abbreviation, trigger, shortcut, snippet, content, label, name…), CMDglows uses them. Without a header, it reads trigger, content, then label, which is the order of a TextExpander export.
  • A CMDglows JSON export, to move your library from one device or account to another.

Before anything is written, a summary shows how many snippets will be imported, how many already exist, and how many cannot be read. A trigger you already have is skipped, never overwritten.

What carries over, what stays behind

Common variables are converted to their CMDglows equivalent:

In your old toolIn CMDglows
Espanso clipboard variable, TextExpander %clipboard{clipboard}
Espanso $|$, TextExpander %|{cursor}
Simple date such as %d/%m/%Y{date:dd/MM/yyyy}
TextExpander fill-in field %filltext:name=…%{argument:…}

Some entries are deliberately left out and counted as unreadable: Espanso regex triggers, images, HTML, forms, dates shifted in time (“tomorrow”), and above all shell commands and scripts. An imported snippet only inserts text. Running a command found in a file you pasted would be a security risk, so CMDglows never imports or runs one. Recreate those few entries by hand if you need them.

Other TextExpander macros stay visible as they are in the text, so you can spot and fix them.

Keep the exit door open

In the same ⋯ menu, Copy as JSON puts your whole library on the clipboard: triggers, contents, labels, tags and folders, sorted by trigger, in readable JSON. Paste it into a file to keep a backup, move it to another account, or convert it for another tool. Your snippets are not trapped in CMDglows either.

A ten-minute migration

  1. Find your library. Espanso: run espanso path to see the config folder; your snippets are in its match subfolder (%APPDATA%\espanso\match on Windows). TextExpander: export your groups as CSV from the app.
  2. Open each file in Notepad, copy all its text, paste it into Import snippets and read the summary.
  3. Test your three most-used triggers in the apps where you type most.
  4. Look for the entries counted as unreadable, and recreate the ones you still use.
  5. Run Copy as JSON once and keep the file as your first backup.

To write triggers that never fire in the middle of a word, read Text expander on Windows: freeze the right sentence. If you are still choosing a tool, the text expander comparison sets out the criteria. CMDglows snippets work on Android and Windows.

Was this article helpful?

Related Articles