Obsidian makes it easy to surround text with quotation marks, bold/italics markdown, and so on. I use the and tags often, and it would be very convenient if there was a hotkey to insert a pair of and tags with the cursor placed in the middle. Is there a way to do that already?
My suggestion: plugin Templater + plugin Hotkeys for templates.
- Create two templates in the folder defined in Templater settings:
<sub><% tp.file.selection() %></sub>
<sup><% tp.file.selection() %></sup>
- With the plugin “Hotkeys for templates” activate each template and then in general Hotkeys search for these two and define your hotkeys
- When you need to introduce this tags in your note, just select the text you want inside the tags and use the defined hotkeys.
For this, I am using espanso with the following configuration:
- trigger: ":sub" replace: "<sub>$|$</sub>" - trigger: ":sup" replace: "<sup>$|$</sup>"
That works like a dream, thank you so much!
Works perfectly! Thanks for sharing!
You could also take a look at the cmenu plugin.
Another option is the amazing Multi-line formatting plug-in
Thanks! I’ll check it out
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.