Skip to content

Instantly share code, notes, and snippets.

@smeech
Last active January 7, 2026 23:20
Show Gist options
  • Select an option

  • Save smeech/dff68f81820ab1bbfbe0168021646cb5 to your computer and use it in GitHub Desktop.

Select an option

Save smeech/dff68f81820ab1bbfbe0168021646cb5 to your computer and use it in GitHub Desktop.
[My spellings] Trigger to add corrected spellings to my_spellings.yml. Copy incorrect and correct words and type ":spell". #espanso #spelling #bash
# Release schema for VSCode/VSCodium/Vim
# yaml-language-server: $schema=https://raw.githubusercontent.com/espanso/espanso/dev/schemas/match.schema.json
matches:
# Trigger to add corrected spellings to my_spellings.yml
# Copy the incorrect and correct words, separated by a space, and type ":spell"
- trigger: :spell
replace: "{{Output}}"
vars:
- name: File
type: echo
params:
echo: $CONFIG/match/my_spellings.yml
- name: Clip
type: clipboard
- name: Output
type: shell
params:
shell: bash
cmd: |
if [ $(echo "{{Clip}}" | wc -w) -ne 2 ]; then exit 0; fi
read -r first_word second_word <<< "{{Clip}}"
echo " - {trigger: $first_word, replace: $second_word, word: true}" >> "{{File}}"
echo $second_word
- {triggers: [aust, oz], replace: Australia, word: true}
- {triggers: [micheal, michale], replace: Michael, word: true, propagate_case: true}
- {trigger: becasue, replace: because, word: true, propagate_case: true}
- {trigger: don;t, replace: don't, propagate_case: true}
- {trigger: taht, replace: that, word: true, propagate_case: true}
- {trigger: yoru, replace: your, word: true, propagate_case: true}
- {triggers: [somting, somthing, someting], replace: something, word: true, propagate_case: true}
- {trigger: tahnk, replace: thank, word: true, propagate_case: true}
- {trigger: repalce, replace: replace, word: true, propagate_case: true}
- {triggers: [hte, eth], replace: the, word: true, propagate_case: true}
- {trigger: amd, replace: and, word: true}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment