Brevis — Automating Text Expansions

I was using Import button from within the Brevis control panel and trying to import the | Brevis.Dates.json and Brevis.Emoji.json files included with the macro.

I was able to set up my macros without any issues and it works perfectly. Thank you!

Congrats on getting it running! Glad to hear that.

@mrpasini Is the Brevis.json saved when I back the entire km folder/xml or should I back it up separately ?

Is the Brevis.json saved when I back the entire km folder/xml or should I back it up separately ?

Brevis saves everything in one Keyboard Maestro global variable. So anything that backs up your global variables will include the Brevis (that's it's name) global variable.

Just backing up your Keyboard Maestro macros will not back up that variable however.

So you can use the Control Panel (periodically) to Export that global to a JSON file, which you can subject to whatever backup torture you've implemented.

Thanks, that’s what I figured I’ll do periodically.

Thanks Mike. I've been enjoying Brevis.

I'm having a weird timing glitch that I haven't yet traced through. When my computer is running slow (I haven't chased down why to this either), when I use a Brevis abbreviation leading with a comma ( , ), it's supposed to add the termination character at the end of the expansion. And Brevis did, at first.

But now, the timing somewhere is off sometimes and it sometimes adds the terminaton character before the expansion:

  • At the beginning of a line, I type the abbreviation (starting with a comma) followed by a Space and I get a space at the beginning of the line and then the expansion.
  • At the beginning of a line, I type the abbreviation (starting with a comma) followed by a Return and I get a Newline and then the expansion on the next line.

Any ideas why?

I can't reproduced that behavior on Sequoia/Apple Silicon or Monterey/Intel. I tested with a comma, my own JSON file using accented characters in the replacement and either a space or return to terminate. Host apps were BBEdit and InDesign.

The trigger is parsed by a regex in the second Action into three local variables. Those are the precede character, the entry and the non-word boundary character (your space or return).

I do see in InDesign that the non-word character is swallowed by InDesign. But that isn't true of BBEdit.

I haven't noticed that before because I use the semi-colon as a precede in InDesign to type the phrase instead of paste it. And in that case, the non-word character is correctly inserted. I put that typing option into Brevis just for InDesign.

Which app are you having trouble with? Have you tried the semi-colon instead of the comma to type instead of paste?

Worst consistent problems are in Facebook, were I have a set of "tag lines" that I use frequently when I share posts:

  • How many times do we have to run the experiment?
  • In case you were wondering...
  • Perspective is everything.
  • Context is everything.
  • We are not alone.

Using the comma I very consistently get the terminator first, then the expanded text. Using the semicolon works, and that's what I've switched to.

So I have a workaround for daily use. But it still nags me as one of those edge cases that may be exposing an underlying problem.

Because it's happening in the Facebook browser app, and because it's acting like a synchronization or race condition issue, I suspect that the core problem may be that my keystrokes are going to the FB server before being formatted and sent back to my display. It may be as simple as the difference between a typed string and a pasted string.

I have a workaround that I'm comfortable using and it's not my app so experimenting is not high on my list. I just thought you might like to know, especially in case it happens to other people and especially in other contexts.

Thanks, August.

I've found a few applications that can't handle the faster paste but everything seems to handle typing the expanded string. Which is why I set the semi-colon default to typing the string.

As I mentioned, I have to do that in InDesign. Apparently you have to do it for Facebook.