Espanso expands a trigger you type into replacement text using YAML match definitions. Put snippets in the active configuration’s match/ directory, put behavior settings and app filters in config/, and use espanso path to find the configuration folder your installation actually uses.
Find the active Espanso configuration folder
Run this command in a terminal:
espanso path
Use the path it prints as $CONFIG in the examples below. Default locations vary by operating system and installation; the documented examples are:
As an Amazon Associate I earn from qualifying purchases.
- Linux:
$XDG_CONFIG_HOME/espanso, often~/.config/espanso. - macOS:
$HOME/Library/Application Support/espanso. - Windows:
%AppData%espanso.
Legacy installations and customized setups can differ, so the command output is more reliable than assuming a default path. Match files belong under $CONFIG/match/; configuration files belong under $CONFIG/config/. Espanso’s Matches Basics documentation describes match definitions, and its configuration documentation covers configuration locations.
Create a basic text expansion
Create or edit a YAML file in $CONFIG/match/, commonly base.yml. A match connects the typed trigger to the text Espanso inserts:
#1 Best Overall
- Brilliant Color Illumination- With 11 unique backlights, choose the perfect ambiance for any mood. Adjust light speed and brightness among 5 levels for a comfortable environment, day or night. The double injection ABS keycaps ensure clear backlight and precise typing. From late-night tasks to immersive gaming, our mechanical keyboard enhances every experience
- Support Macro Editing: The K671 Mechanical Gaming Keyboard can be macro editing, you can remap the keys function, set shortcuts, or combine multiple key functions in one key to get more efficient work and gaming. The LED Backlit Effects also can be adjusted by the software(note: the color can not be changed)
- Hot-swappable Linear Red Switch- Our K671 gaming keyboard features red switch, which requires less force to press down and the keys feel smoother and easier to use. It's best for rpgs and mmo, imo games. You will get 4 spare switches and two red keycaps to exchange the key switch when it does not work.
- Full keys Anti-ghosting- All keys can work simultaneously, easily complete any combining functions without conflicting keys. 12 multimedia key shortcuts allow you to quickly access to calculator/media/volume control/email
- Professional After-Sales Service- We provide every Redragon customer with 24-Month Warranty , Please feel free to contact us when you meet any problem. We will spare no effort to provide the best service to every customer
matches:
- trigger: ":sig"
replace: "Best regards,nYour name"
Here, typing :sig expands to a two-line sign-off. YAML indentation matters. Quote strings when their contents need it, especially when using escape sequences such as n or t, or when a value begins with a YAML-special character. A literal block using | preserves line breaks; a folded block using > folds them into spaces.
The minimal form is also valid:
- trigger: hello
replace: world
Espanso should pick up configuration changes automatically. If a new match does not work, verify that the file is in the active configuration folder and that the YAML parses; then follow the official troubleshooting guidance for the installed version.
Choose a trigger that fits the expansion
Use a plain literal trigger for the most predictable one-to-one replacement. A distinctive prefix such as a colon can reduce accidental matches because it is unlikely to occur at the start of an ordinary word, but Espanso does not require one.
Recommended Free Tools
Rank #2
- 【Mechanical Keyboard: Responsive BLue Switches】RisoPhy PC keyboard features clicky keys which offer you higher accuracy and quicker response with an enjoyable click sound when typing.This keyboard is more comfortable to type on since it features deeper key travel,greater feedback,and more space between keys.For those who prefer keyboards with a more tactile and "clicky" feel,our keyboard with BLUE switches is a nice choice.
- 【Rainbow Backlit Keyboard: illuminate Your Desktop】With 9 different backlights,5 levels of light speed and brightness,this computer keyboard enriches your gaming experience and improves your mood greatly,which is a great addition to your desktop,especially in the dark.Plus,the ultra-durable double injection ABS engineered keycaps provide crystal clear uniform backlight and greatly improve your typing accuracy at night.
- 【High-end 104 Keys Full-Size Keyboard】The Win lock function frees your worry about mistyping when gaming(Fn+Win).Keycaps are pluggable and easy to clean,saving you much unnecessary trouble.We designed 4 hydrophobic holes for this keyboard,allowing water to flow away quickly to prevent damage to the keyboard.No longer afraid of accidents.(✦Include a keycaps puller for cleaning or other needs.)
- 【Advanced Ergonomic Comfort】This PC gamer Keyboard adopts a scientific stair-up keycap design that keeps your arms in the most natural state to minimize hand fatigue for long time use.In order to improve your posture and make you more comfortable during use,the wired keyboard comes with 2 strong foldable rear kickstands to slope it.Moreover,the keyboard is non-slip enough because there are 4 rubber padding underneath the keyboard.
- 【100% Anti-Ghosting & 12 Multimedia Combinations】100% anti-ghosting gaming keyboard allows all keys to work simultaneously,no matter how fast you type.12 multimedia key shortcuts allow you to quickly access to calculator/media/volume control/email.RisoPhy mechanical gaming keyboard with the number pad greatly improves your productivity.This ultra-durable keyboard with up to 50 million keystrokes life works well with Windows 7/8/10/XP/VISTA/95/98/XP/2000/ME/VISTA and Mac OS Xbox etc.
| Approach | Example | Best suited to | Trade-off |
|---|---|---|---|
| Single literal trigger | trigger: ":email" |
One memorable shortcut for one expansion. | Easiest to reason about; choose a distinctive string to avoid accidental expansion. |
| Aliases | triggers: [hello, hi] |
Several typed forms that should produce the same replacement. | Convenient reuse, but each alias is another possible trigger. |
| Word-boundary matching | word: true |
Words or correction-like triggers that should not expand inside a longer word. | Restricts matching at word boundaries; edge rules and separators can be further controlled with left_word, right_word, and word_separators. |
| Regex trigger | regex: "..." |
Variable input, such as a number or a captured argument. | More expressive, but adds pattern syntax and efficiency considerations; use an ordinary trigger when it suffices. |
For aliases and word matching, see the matches documentation. Regex triggers can capture values for use in the replacement. Espanso uses Rust’s regex implementation and supports named groups in Rust style, such as (?P<person>.*), which makes the captured value available as a variable. Not every regex feature is available. The documentation describes a 30-character regex match-set limit in older versions; from v2.3.0 onward, max_regex_buffer_size can override the limit. Consult the regex trigger documentation for syntax and version details.
Organize match sets as snippets grow
Espanso loads YAML files in $CONFIG/match/ and its subfolders. Separate related expansions into files such as emails.yml or code.yml, then use imports: when one match set should reuse definitions stored elsewhere. Since v2.3.0, .yaml files are recognized alongside .yml; the documentation recommends not mixing the extensions without a reason. Match sets and imports are documented here.
Files whose names start with an underscore are not loaded automatically. That makes them useful for snippets you want to load only in selected applications. For example, create a code-only match set:
Rank #3
- Multi-Device Connection: The F99 wireless mechanical keyboard provides three connection methods, including BT5.0, 2.4GHz wireless mode, and USB wired mode. It can be connected to up to five devices at the same time, and switch between them easily by FN and key combination keys. No limits about your keyboard connection to meet the needs of work, gaming, and study
- Hot-swappable Custom Keyboard: The switches and keycaps can be freely replaced(keycap/switch puller are included in the package).This customizable keyboard with hot-swap PCB allows users to replace 3 pins/5 pins switches easily without soldering issue. F99 mechanical keyboards equipped with pre-lubed linear switches, bring smooth typing feeling and pleasant typing sound, provide fast response for exciting game
- Mechanical Gaming Keyboard: F99 is a premium mechanical keyboard for both work and game. With 16 RGB lighting effect to adds a great atmosphere to the game room. Keys support macro customization, which allows macro recording and editing, customize key function and 16.8 million light colors, and supports cool music rhythm lighting effects with driver. N-key rollover, keyboard can respond to multiple key presses at the same time, which is helpful in very exciting real-time games
- Gasket Structure and PCB Single Key Slotting: This computer keyboard features a advanced structure, extended integrated silicone pad, and PCB single key slotting, better optimizes resilience and stability, making the hand feel softer and more elastic. Five layers of filling silencer fills the gap between the PCB, the positioning plate and the shaft,effectively counteracting the cavity noise sound of the shaft hitting the positioning plate, and providing a solid feel
- PBT Keycaps and 8000mAh Battery: 99 keys 96% layout compact keyboard can save more desktop space while keep necessary arrow keys and number area for games and work. The rechargeable keyboard built-in 8000mAh large capcacity battery to provide more power and longer battery life. Double shot PBT keycaps, made from two colors material molded into each others, make the keycaps characters maintain the vibrance and saturation, clear and not fade
# $CONFIG/match/_js_snippets.yml
matches:
- trigger: ":log"
replace: "console.log($|$);"
The $|$ cursor hint places the cursor inside the inserted text. Only one cursor hint is supported per match, and multiline hints can behave unexpectedly in auto-indenting code editors. Use a form when a template needs multiple inputs. You can also add a label to identify a match in Search Bar results, and search_terms to make it easier to find. Reusing one trigger across multiple matches opens a selection dialog, which is useful for choosing among alternatives. Details are in Matches Basics.
Apply configuration to a particular application
App-specific configurations are YAML files in $CONFIG/config/. A filter determines when a file applies. Settings in an active app-specific file override matching keys from config/default.yml; other default values are inherited. The available filter fields target different identifiers:
| Filter | What it matches | Platform support and practical use |
|---|---|---|
filter_exec |
Current application executable path. | Full support is listed for Windows and macOS; Linux support is partial. Often stable for basic app targeting. |
filter_class |
Current window class; on macOS this is the app identifier, and on Windows the executable path. | Full support is listed for Windows, macOS, and Linux. Often a good starting point for basic targeting. |
filter_title |
Current window title. | Full support is listed for Windows, macOS, and Linux. Useful for a document, tab, or project, but the title can change as content changes. |
Filter values are regular expressions, so a broad pattern can match more than one window or application. Espanso recommends beginning with filter_exec or filter_class for straightforward cases because they tend to be more stable. Before writing a filter, run #detect# inside the target application, or use the Search Bar’s active application information command, to inspect the detected title, executable, and class. Consult the app-specific configuration documentation for supported fields and platform distinctions.
Rank #4
- 【Adjustable Yellow Led Backlit】Select from 9 stunning backlight modes to customize your preferred ambient lighting. Featuring 5 adjustable brightness levels and flexible light speed control, it offers great visibility round the clock. With premium double-injection shine-through ABS keycaps, backlight shines evenly while delivering accurate typing performance. Ideal for late-night work and immersive gaming alike.
- 【Professional Red Switches】 This gaming keyboard is equipped with 3-pin hot swappable red switches, which are linear, top-to-bottom switches. These switches require less force to press down and the keys feel smoother and easier to use. No tactile "bump" but responsive. A great choice for work and play!
- 【Full N-Key Rollover Anti-Ghosting】Support full-key simultaneous input with no key conflicts, letting you execute complex key combinations smoothly during intense gaming or fast typing tasks. Equipped with 12 multimedia shortcut keys, you can instantly access frequently used functions including the calculator, media playback, volume adjustment and email.Press FN+W to swap the WASD keys with the arrow keys.Press FN+Win to lock the Windows key and prevent accidental interruption during gaming.
- 【Extreme Durability】 50 million times keystroke test, small actuation force and short travel. Solid base with durable 3-color keycaps design, it is built to withstand a lifetime of gaming. Two orange replacement keycaps are included in the package for you to change according to your preference.
- 【Wide Compatibility】 Supports computer system including Windows10, Windows 8, Windows 7, Mac OS X, Windows XP, Windows VISTA, etc. With USB-A plated port to ensure the stability of data transmission. No delay, no error.
For example, to disable Espanso in Telegram when the executable path matches the documented pattern:
# $CONFIG/config/telegram.yml
filter_exec: "telegram"
enable: false
Replace the example filter with a pattern appropriate to the value detected on your system. Only one app-specific configuration can apply at a time. If more than one filter matches, Espanso chooses the first applicable configuration alphabetically by filename, so use filenames that make the intended precedence clear. Filter selection may need to differ across operating systems.
The current documentation says app-specific configurations are not supported in Wayland. Do not rely on per-application filters in a Wayland session.
Best Value
- 【Gasket Structure with Sound-Absorbing Foams】The gasket structure delivers exceptional durability and stable performance, backed by reliable quality assurance. Equipped with 5 layers of thickened sound-absorbing foam and a silicone dampening pad, it reduces up to 40% of typing noise and eliminates 80% of hollow resonance. Experience a creamy, crisp typing sound with natural, clear feedback—no more annoying hollow or clunky noises to disrupt your focus, whether gaming or working.
- 【RGB Side Lighting & Rainbow Effects】Designed to elevate your desktop setup, this backlit mechanical keyboard features 19 preset rainbow LED lighting effects and stunning RGB side-edge illumination (note: RGB lighting is only available for the side edges). Adjust brightness across 5 levels or turn it off completely for a minimalist look. The double-injection PBT keycaps ensure uniform, clear backlight transmission and precise, wear-resistant typing. Whether gaming in low light or showcasing your setup, the immersive lighting transforms any desktop into a glowing command center, upgrading your mechanical keyboard experience with striking visual appeal.
- 【Dual Knob for Multimedia & Backlight Control】Effortlessly manage media and lighting with the keyboard’s dual-knob design. Quick-access controls let you adjust media volume, switch backlight effects and more—all at your fingertips. Easily cycle through 19 different lighting effects, or adjust backlight brightness and speed to match your mood. Use FN+F1–F12 shortcuts to access media controls, the calculator, and other essential functions, boosting your efficiency during work or gaming.
- 【104-Keys Anti-Ghosting】Equipped with anti-ghosting technology, this mechanical gaming keyboard ensures every simultaneous keystroke registers accurately, allowing multiple keys to work together at high speed without lag. Each key is controlled by an independent switch, delivering fast response times that enhance your gaming performance and give you a competitive edge. Beyond gaming, its ergonomic design also makes it a superior typing tool for office work, balancing functionality and comfort.
- 【Ergonomic Design & Wide Compatibility】Features an ergonomic high-low key layout with 3-color (white, pink, purple) keycaps, plus a 2-stage kickstand to reduce hand fatigue during long typing or gaming sessions. Compatible with PC, Mac, laptops, tablets, and desktop computers, it works seamlessly with Windows 7/8/10/11/XP/Vista, Linux, and Mac OS systems. USB wired connection enables plug-and-play convenience—no complicated setup required, just connect and start using.
Load a snippet set only in Visual Studio Code
Combine the underscore-prefixed match set with an app-specific configuration that includes it:
# $CONFIG/config/vscode.yml
filter_title: "Visual Studio Code"
extra_includes:
- "../match/_js_snippets.yml"
Because _js_snippets.yml is not loaded automatically, the extra_includes entry makes its match available through this configuration rather than as a general match set. The title filter is the documented example; first check the detected application details and choose the filter that best fits your platform and whether you want to target the whole application or a particular window title. Selective inclusion and extra_includes are covered in the match sets documentation.
Validate the setup and diagnose failures
- Confirm
espanso pathpoints to the folder containing the files you edited. - Check that match definitions are under
match/and app-specific settings are underconfig/. - Check YAML indentation, quoting, and trigger spelling; confirm an underscore-prefixed match file is explicitly included.
- Use
#detect#to verify the actual app title, executable, and class before adjusting a filter. - If an expansion fails only in a particular app, check filter matching and precedence, then consult troubleshooting for the version you installed.
force_mode: clipboard and force_mode: keys are diagnostic overrides for cases where the normal text-injection path fails. Use them to investigate an injection problem, then prefer the appropriate global or app-specific backend setting once the cause is clear. See the match options documentation and troubleshooting guidance.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




