Custom-dictionary-like replacements, but with interaction?

I sometimes take notes of conversations in Drafts, which involves a lot of abbreviations. Some are pretty consistent (“kinda” for “kind of”, “sorta” for “sort of”) but others aren’t (“chg” could be “change” or “charge” depending on context, for example). I probably have dozens if not a couple hundred of these that I’ve gotten accustomed to using over years of taking notes by hand and on my computer.

I’d like to build a custom dictionary of abbreviations, and have an action that will go through a draft and offer to change matches that it finds. Critically, I don’t want the changes to be automatic, because a given abbreviation could be used for different words in different contexts.

I could write the whole thing from scratch in JS, but that would take a lot of time and effort given my javascript skills.

Does anyone have suggestions for existing actions or groups of actions, or other approaches, that would help me put something like this together?

I could also move the text to another plain-text or markdown app if that helps (I already use nvUltra, Multimarkdown Composer, The Archive, BBEdit and SublimeText for various kinds of work) Other tools I have and use fairly regularly: Python, Hammerspoon, Keyboard Maestro, TextExpander.


This action and discussion might be a good starting place for you…

This is fantastic — thanks! It looks like it’ll get me most or all of the way there. At first I thought I’d have to work in the multiple-choice aspect, but it’s already in there.

I just need to make sure there’s a way to decline any replacement and keep going. But that may not be necessary depending how it works. I’ll play around with it.

1 Like