Lol. @gasspence, I'm just finishing off my writing my own app to do something similar, mainly to use with Hype since it does not (yet) have a built in user defined code library..
My app uses the new'ish Apple application extensions to allow me to type a short text in say Hype, select it and select my Quick Text.app's extension.
It then replaces the short text with whatever text/code I have set for that particular short text.
You can also add new entries by selecting a block of text and then a service contextual to add to Quick Text.app, which opens the app for you to edit the entry.
You can also define a preference to encapsulate unknown selected for example I set mine to encapsulate it in console.log().
You can also add using the App.