Obsidian Front Matter Tag Wizard
Tired of having to type #
to get tag autocompletion in your Obsidian note front matter? I feel your pain. This plugin enables tag autocompletion in your front matter...and beautifully formats those same tags to boot!
Features
- Enables unprefixed Tag autocompletion in front matter!
- Fully supports multiline tags!
- Optional auto-formatting for tags (default:
enabled
)!
Getting Started
This plugin has been submitted to Obsidian for review, but in the meantime it can be installed for testing via the BRAT plugin.
- Install BRAT
- Go to the
Obsidian42 - BRAT
options tab - Click
Add Beta plugin
and enter the folling URL:
https://github.com/Tohsig/obsidian-front-matter-tag-wizard
- Open the
Community Plugins
tab - Search for
Front Matter Tag Wizard
and enable the plugin.
Done! You should immediately get tag autocompletion and autoformatting in the front matter of your notes.
Auto-formatting
The built in auto-formatting is enabled by default and only affects front matter tags. No need to worry about the rest of your content. It will trigger automatically whenever you select an autocomplete suggestion (via enter
or mouseclick
), or when your cursor leaves the tags:
list in your front matter.
When it runs, the auto-formatter will remove duplicate tags and then standardize tag formatting according to these options:
Option | Description | Default |
---|---|---|
Enable Auto-formatting |
Enable/Disable auto-formatting completely | enabled |
Auto-format Mode |
Controls whether tags are put on a single line or multiple lines | Single Line |
Remove Extra Characters |
Removes # and " characters from your front matter tags |
enabled |
Roadmap
- Add an option to sort front matter tags alphabetically.
- Allow autoformatter to edit background notes.
- Get some saner YAML parsing in here.
- Add "Format front matter tags" to quick switcher.
Contributing
Feel free to submit issues for bug reports and additional features! This is a project I spun up to support my daily workflow, so I'll be very interested to hear how it does elsewhre.
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Acknowledgments
Huge thanks to the incredible Obsidian Dataview and Obsidian Plugin Developer Docs projects. I was able to learn a ton about Obsidian's API from both, and I highly recommend them if you want to develop a plugin.