It seems like there are some options available to this, one of them is the GitHub - ArianaKhit/text-snippets-obsidian: Snippets plugin for obsidian .
However, there is a few pitfalls as it’s not updated lately, and the keypress detection method it uses is not supported in the newer version. See this issue for a more complete explanation: "Space" doesn't expand anymore · Issue #47 · ArianaKhit/text-snippets-obsidian · GitHub
There are two workaround available, which I’ve found so far. One is to use a fixed main.js
linked from in that issue thread, and the other is to just disable the shortcuts in settings, and add your own hotkey.
So get it to work do the following:
- Install the plugin “Text snippets” via Settings > Community plugins, and enable it
- Goto the settings of the plugin, and add the text you want expanded into the large box (and disable the tab and Space expansion, as they don’t work anyways)
- Goto Settings > Hotkeys and search for “run snippet replacement” (you only need to type parts of that), and hit the plus icon, and enter a hotkey of your own
Now when you type your smart phrase, you can hit that hotkey, and it’ll expand the text for you. You can even go to one of your smart phrases in retrospect, and hit the hotkey and it’ll expand it for you.
Do note that dot phrases are not supported out of the box, as it messes with the word delimiters. But if you remove period from the word delimiter characters in the bottom of plugin settings, you can use .test
as a smart phrase as well. But then again, since you need to hit the hotkey, you could just use test
as the smart phrase…
Hope this helps!
PS! If you’re looking for expansion outside of Obsidian, this thread talks about something called espanso: Espanso (text expander) Snippet Showcase