Brevis β€” Automating Text Expansions

Brevis (ars longa, vita brevis or endless work, brief life) is a compact, efficient system for managing a collection of single action, insert-text expansions triggered by typed strings.

ss-93

In short, it automates Keyboard Maestro text expansions.

HIGHLIGHTS

  • A single three-macro system for all text expansions

  • Text expansions are organized in categories that can be filtered for display

  • One global variable stores all your text expansions so your Keyboard Maestro plist doesn't expand when you add an expansion

  • The initial character of the typed string trigger modifies behavior, inserting by pasting or typing and dropping or keeping the trailing character

  • Support for Keyboard Maestro tokens, including the insertion point token (%|%)

  • Includes two optional utility macros to edit your text expansions in a text editor

  • Compatible with existing Keyboard Maestro text expansion macros, with which it does not conflict

  • Control Panel to list, filter, add, delete, export, import and merge expansions

  • Create a text expansion from selected text with error checking

DESCRIPTION

Rather than using the Keyboard Maestro editor itself to manage a collection of separate macros for each text expansion, Brevis provides both 1) an easy-to-use Control Panel to create, run, list, export, import and merge them as well as 2) a faceless way to create and run them.

Whether you need a quick text expansion temporarily or can’t remember the ones you’ve already recorded, Brevis quickly comes to the rescue. The Control Panel can function as a palette of expansions as well as provide a quick interface for maintenance functions.

DOWNLOADS

Here's the Control Panel macro:

18 September 2021: Replaced Brevis.11c.zip with minified JavaScript code, saving 1K.

5 October 2021: Corrected an error in the Create from Selection macro's pattern for the trigger.

(When I first started working on this macro app, Jim Underwood (JMichaelTX) responded to my request for help with an AppleScript to parse the Keyboard Maestro plist. While that did what I wanted, what I wanted wasn't practical and I took the approach used in this macro, skipping the plist in favor of a global variable. Our pleasant exchange was the last I had with him (among many others over the years) before his untimely passing. This contribution is in tribute to him and the assistance he generously gave here.)

3 Likes

:slight_smile: I might be tempted to nuance that translation towards something like – skills take long to master, life is short.

Or visually, in the many renderings of the vanitas theme ...

1 Like

Does it show a conflict palette or some way to select between two expansions that use the same text trigger?

It prevents adding an expansion that uses a trigger already in the collection when you use its methods for adding expansions.

If you manually add a conflict using the editing utility or by typing one into the variable in the Keyboard Maestro Editor, it just uses the first one it finds and ignores the second.

But by design it assumes the triggers are unique.

Regarding existing expansions outside Brevis, those would have priority by virtue of not requiring a closing non-word character. And if by chance, they do require one, you can simply use a different one for the Brevis trigger to avoid a conflict.

1 Like

Just a note to report I've updated the Brevis.11c.zip file with a new version of the (unversioned) Create from Selection macro that corrects the trigger pattern so you can enter any legal trigger.