Version 0.5.1 is finally here and brings a few interesting features!
Let's see them:
Edit subcommand
Originally proposed by @GJKrupa in #171 , espanso now ships with the edit
subcommand, which makes editing configuration files much more convenient. Let's see how it works:
If you open a terminal and type:
espanso edit
the default system editor (Notepad on Windows and Nano on Unix systems) will be spawned, editing the default.yml
. Then, after you saved the file and exited the editor, espanso will automatically restart, loading the new changes.
Customizing the editor
But wait! Nano? Are you serious?
I thought about it for a while, and eventually I opted for a newby-friendly approach (what if one of our fellows
expanders gets trapped into VIM? :)
Jokes aside, customizing the editor is super easy, just specify your choice in the EDITOR
(or VISUAL
)
envorionment variables, such as:
EDITOR=/usr/bin/vim
Editing files in the user directory
If you invoke espanso edit
without further arguments, it will open the default.yml
file. But what if you want to edit files in the user/*
directory? Luckily, you can simply specify the name as an additional argument (without the extension).
For example, if you want to edit the user/email.yml
file, you can type:
espanso edit email
ClipboardExtension
Espanso now allows to include the current clipboard content in a match, which can be useful in many situations.
For example, let's imagine you want to create the ultimate HTML link shortcut:
- trigger: ":a"
replace: "<a href='{{clipboard}}' />$|$</a>"
vars:
- name: "clipboard"
type: "clipboard"
If you now copy a link in the clipboard (for example by selecting and then CTRL+C) and then type :a
, you'll
see the following replacement appear:
<a href='YOUR_COPIED_LINK'></a>
Too see the reasons behind this feature, see #192.
Multi-trigger matches
Originally proposed by @muhlinux in #144, now espanso allows matches to have multiple triggers, by using
the triggers
keyword and specifying a list of valid triggers:
- triggers: [":lol", ":xd"]
replace: ":laughing:"
Case-propagating matches
Originally proposed by @muhlinux in #152, espanso now support matches that propagate the casing of the trigger. Just add the propagate_case: true
option in a match, such as:
- trigger: foo
replace: bar
propagate_case: true
word: true
Based on the case style you use in the trigger, espanso will trigger the replacement as:
foo => bar
Foo => Bar
FOO => BAR
Minor changes and bug fixes
- Now the
preserve_clipboard
option is enabled by default. - Add the possibility to escape double brackets in replacements. Fix #187
- Change the urxvt terminal paste shortcut. Fix #166
- Change the Windows installer to avoid VC++ Redist installation (which required Admin rights) by switching to local deployment of DLLs. Fix #189