Espanso

Trying out a new, open-source and powerful text expander

22 Jul 2022

See Nic Note: Text Expanders for background.

App resources
Website https://espanso.org/
Documentation https://espanso.org/docs/
Hub (packages) https://hub.espanso.org/
Github https://github.com/espanso/espanso
Community (Reddit) https://www.reddit.com/r/espanso/
Community (Github) / Feature requests https://github.com/espanso/espanso/discussions/categories/feature-requests-and-ideas

Error upon installation - let's see consequences:

app_espanso-path-error.jpg

Configuration:
(run espanson path in Terminal for the list)
- Config: /Users/user_folder/Library/Application Support/espanso
- Packages: /Users/user_folder/Library/Application Support/espanso/match/packages
- Runtime: /Users/user_folder/Library/Caches/espanso

5mns in, love it. Managing config and snippets via default.yaml and base.yaml is great.

Snippets unfurl in file dialog windows, which was not working with Alfred's snippets feature Alfred.

My date snippet for file prefixes (used across most of my files):

# Print the current date
- trigger: ";d"
replace: "{{mydate}}"
vars:
    - name: mydate
    type: date
    params:
        format: "%y%m%d "

Note: I find using ; as trigger prefix to be more natural than : as it avoids needing to hit the Shift key each time - though this depends on one's keyboard layout.

Highlights from documentation

sync snippets across devices

using Dropbox ๐Ÿ˜Š : https://espanso.org/docs/sync/

Make symlink with ln -s "/Users/nic/Dropbox/Apps/espanso" "/Users/nic/Library/Application Support/espanso"

Backspace Undo

add undo_backspace: false to default.yaml to remove the behaviour.

Espanso Hub

https://hub.espanso.org/search

a few interesting packages for me:

basic-emojis

https://hub.espanso.org/basic-emojis

git

https://hub.espanso.org/git

mac-symbols

https://hub.espanso.org/mac-symbols

foreign-thanks

https://hub.espanso.org/foreign-thanks

french-accents

https://hub.espanso.org/french-accents

Ze French langouage iz sometimez peinful wiz ol its akzentz!

Usual way on macOS is just to hit a key and stay on it until all the character's options appear, then select the number of the desired accented character

apps_espanso-french-accents.jpg

Let's see if this helps.

apps_espanso-french-accents.gif

Seems to work well though I had to remove this match which is basically unusable (because replacing to french accent everytime a e precedes a colon):

  - trigger: "e:"
    replace: "รซ"

also removed this one, which is messing up words like "goes":

  - trigger: "oe"
    replace: "ล“"

also removed this, because it hijacks words like "movies,":

  - trigger: "c,"
    replace: "รง"

actually, let's change it to add a ; prefix to the trigger:

  - trigger: ";c,"
    replace: "รง"

24 Jul 2022 ended up adding the ; prefix to all triggers in this package.yaml file as default behaviour was annoying. Let's see if it becomes natural & efficient over time.

markdown-shortcuts

https://hub.espanso.org/markdown-shortcuts (note a lot of keystrokes saved though)

espanso-get-ip-pack

https://hub.espanso.org/get-ip

My configuration file

19 Nov 2022

My base.yml:

# 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:

  # Current date as YYMMDD
  - trigger: ";d"
    replace: "{{mydate}}"
    vars:
      - name: mydate
        type: date
        params:
          format: "%y%m%d"

  # Timestamp as YYMMDD-HHMM
  - trigger: ";t"
    replace: "{{mydate}}"
    vars:
      - name: mydate
        type: date
        params:
          format: "%y%m%d-%H%M"

  # 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/

  # MY SHORTCUTS
  # sorted alphabetically to avoid overlapses
  - trigger: "6cz"
    replace: "https://us02web.zoom.us/my/nicolas.deville?pwd=xxxxxxxxx"
  - trigger: ";100"
    replace: "๐Ÿ’ฏ"
  - trigger: ";ang" # ANGel
    replace: "๐Ÿ˜‡"
  - trigger: ";ard" # ARrow Down
    replace: "โฌ‡๏ธŽ"
  - trigger: ";arl" # ARrow Left
    replace: "โฌ…๏ธŽ"
  - trigger: ";arr" # ARrow Right
    replace: "โžค"
  - trigger: ";aru" # ARrow Up
    replace: "โฌ†๏ธŽ"
  - trigger: ";bb" # BtoBsales
    replace: "https://btobsales.eu"
  - trigger: ";blo" # BLOwn
    replace: "๐Ÿคฏ"
  - trigger: ";blu" # BLUsh
    replace: "๐Ÿ˜ณ"
  - trigger: ";conf" # CONFused
    replace: "๐Ÿ˜•"
  - trigger: ";cool"
    replace: "๐Ÿ˜Ž"
  - trigger: ";cv"
    replace: "https://cv.nicolasdeville.com"
    # ;d taken by date insertion above
  - trigger: ";ex" # EXcited
    replace: "๐Ÿค—"
  - trigger: ";fc" # Fingers Crossed
    replace: "๐Ÿคž๐Ÿผ"
  - trigger: ";geek"
    replace: "๐Ÿค“"
  - trigger: ";gg"
    replace: "๐Ÿ‘๐Ÿผ"
  - trigger: ";hap" # HAPpy
    replace: "๐Ÿ˜"
  - trigger: ";li" # LInkedin
    replace: "https://www.linkedin.com/in/ndeville"
  - trigger: ";ll"
    replace: "๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚"
  - trigger: ";lol"
    replace: "๐Ÿ˜‚"
  - trigger: ";luc" # LUCk
    replace: "๐Ÿ€"
  - trigger: ";mer"
    replace: "๐Ÿ™๐Ÿผ"
  - trigger: ";nd"
    replace: "@nicolasdeville.com"
  - trigger: ";ok"
    replace: "๐Ÿ‘Œ๐Ÿผ"
  - trigger: ";phd" # PHone De
    replace: "+49 xxx xxx xxxx"
  - trigger: ";phu" # PHone Uk
    replace: "+44 xxx xxxx xxx"
  - trigger: ";puz"
    replace: "๐Ÿค”"
  - trigger: ";re"
    replace: "๐Ÿ™„"
  - trigger: ";sad"
    replace: "๐Ÿ˜•"
  - trigger: ";shrug"
    replace: "๐Ÿคท๐Ÿปโ€โ™‚๏ธ"
  - trigger: ";smi"
    replace: "๐Ÿ˜„"
  - trigger: ";sml"
    replace: "๐Ÿ˜Š"
  - trigger: ";sta" 
    replace: "โญ๏ธ"
  - trigger: ";str"
    replace: "๐Ÿ’ช๐Ÿผ"
  - trigger: ";sw"
    replace: "๐Ÿ˜…"
    # ;t taken by date-time insertion above
  - trigger: ";what"
    replace: "๐Ÿคท๐Ÿปโ€โ™‚๏ธ"
  - trigger: ";wi"
    replace: "๐Ÿ˜‰"
  - trigger: ";wow"
    replace: "๐Ÿ˜ฎ"
  - trigger: ";wt"
    replace: "๐Ÿ˜œ"

Questions

Unfurl after space

I see two possibilities :

use word: true option.
or use regex like this regex: ";d\\s"

links

social