README file from
GithubHeading Toggler for Obsidian
Copyright © Tony's Studio 2024
Overview
This plugin allows you to toggle heading levels quickly. You can bind hotkeys to increase or decrease heading levels without typing those # characters. 😀
Features
- Increase heading level: normal text to H6, H6 to H5 ... H2 to H1.
- Decrease heading level: H1 to H2, ... H6 to normal text.
- Toggle heading level to H1...6: Toggle between heading and normal text.
You can bind these commands with your favorite hotkeys in the options. 😉
Installation
From Community Plugins
- Go to the "Community plugins" section in the Options dialog.
- Browse for "Heading Toggler" and click "Install" when you find it.
- Go back to "Installed plugins" to enable it.
From GitHub Release
- Go to the release page of heading-toggler-obsidian.
- Download the plugin files (
main.jsandmanifest.json). - Place them in the plugin folder in the Obsidian vault, e.g.
.obsidian/plugins/heading-toggler. You may need to create a new directory. - Go to "Community plugins" > "Installed plugins" to enable it.
Limitations
By default, Obsidian doesn't support nested headings, which means only the H1 in the following Markdown will be rendered as expected.
# Normal H1
- ## H2 in list
> ### H3 in quotes
Therefore, this plugin won't apply nested headings and takes listing and quotes as normal text as below.
# Normal H1
## - H2 in list
### > H3 in quotes
Contributing
Improvement of this plugin is welcomed. 😋
Project Setup
Clone the repository: heading-toggler-obsidian. If you don't want to develop it inside the Obsidian vault, you can create a link to the repository.
For Windows users, you can use mklink.
mklink /D heading-toggler path\to\your\repository
For Linux users, you can use ln.
ln -s heading-toggler path/to/your/repository
Development
This plugin is quite simple, all logics are in main.ts.
npm run dev: build the plugin for development.npm run build: build the plugin for production.npm run version: update version.