Created
May 28, 2025 15:04
-
-
Save millhoused/093286ceac5cb6f48a58262e8b41a052 to your computer and use it in GitHub Desktop.
Espanso base yml file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# espanso match file | |
# For a complete introduction, visit the official docs at: https://espanso.org/docs/ | |
# You can use this file to define the base matches (aka snippets) | |
# that will be available in every application when using espanso. | |
# Matches are substitution rules: when you type the "trigger" string | |
# it gets replaced by the "replace" string. | |
matches: | |
# Simple text replacement | |
- trigger: ":espanso" | |
replace: "Hi there!" | |
# NOTE: espanso uses YAML to define matches, so pay attention to the indentation! | |
# But matches can also be dynamic: | |
# Print the current date | |
- trigger: ";date" | |
replace: "{{mydate}}" | |
vars: | |
- name: mydate | |
type: date | |
params: | |
format: "%m/%d/%Y" | |
# Date and Time Stamps | |
# Print the current date | |
- trigger: ";d " | |
replace: "{{mydate}}" | |
vars: | |
- name: mydate | |
type: date | |
params: | |
format: "%Y%m%d" | |
# Print the current date | |
- trigger: ";mdy " | |
replace: "{{mydate}}" | |
vars: | |
- name: mydate | |
type: date | |
params: | |
format: "%m-%d-%Y" | |
# Print the current date | |
- trigger: ";mdy/ " | |
replace: "{{mydate}}" | |
vars: | |
- name: mydate | |
type: date | |
params: | |
format: "%m/%d/%Y" | |
# Print the current date | |
- trigger: ";ymd " | |
replace: "{{mydate}}" | |
vars: | |
- name: mydate | |
type: date | |
params: | |
format: "%Y-%m-%d" | |
# Print the current date | |
- trigger: ";ymd/ " | |
replace: "{{mydate}}" | |
vars: | |
- name: mydate | |
type: date | |
params: | |
format: "%Y/%m/%d" | |
- trigger: ";ts " | |
replace: "{{timestamp}}" | |
vars: | |
- name: timestamp | |
type: date | |
params: | |
format: "%b %d, %Y %I:%M%p" | |
- trigger: ";t " | |
replace: "{{time}}" | |
vars: | |
- name: time | |
type: date | |
params: | |
format: "%R" | |
# Print the output of a shell command | |
- trigger: ";shell" | |
replace: "{{output}}" | |
vars: | |
- name: output | |
type: shell | |
params: | |
cmd: "echo 'Hello from your shell'" | |
# And much more! For more information, visit the docs: https://espanso.org/docs/ | |
# Shell of an html page with required tags and a table to boot | |
- trigger: ";html" | |
replace: | | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>TitleHere</title> | |
<meta charset="utf-8"> | |
</head> | |
<body bgcolor=white> | |
<H1>HeadingHere</H1> | |
<table border = 2><tr><th>ColumnHeading1</th><th>ColumnHeading2</th><th>ColumnHeading3</th></tr><tr><td>Row1Value1</td><td>Row1Value2</td><td>Row1Value3</td></tr><tr><td>Row2Value1</td><td>Row2Value2</td><td>Row2Value3</td></tr></table> | |
</body> | |
</html> | |
# Bash file mac first line | |
- trigger: ";bash" | |
replace: "#!/bin/bash" | |
word: true | |
# Bash file linux first line | |
- trigger: ";lbash" | |
replace: "#!/usr/bin/bash" | |
word: true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment