Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Heading Handler

Malte HenrikssonMalte Henriksson65 downloads

Smart heading commands that respect document hierarchy and indentation.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates6

Smart heading commands for Obsidian that respect document hierarchy and indentation.

Heading Handler Demo

Features

  • Context-aware heading operations - Automatically maintains proper heading hierarchy based on parent headings and indentation levels
  • Multi-line selection support - Apply heading changes to multiple lines at once
  • Works with unordered lists - Handles headings within -, *, and + bullet list items
  • Respects indentation - Ensures nested content maintains appropriate heading levels relative to parents

Commands

Smart Promote Heading

Increases heading level while respecting document structure. If demoting would violate hierarchy (e.g., making a child heading lower than its parent), the heading is clamped to the minimum valid level or removed.

Smart Demote Heading

Decreases heading level intelligently. When a heading reaches its minimum valid level (based on parent + indent), further demotion removes the heading entirely.

Increase Heading at Current Line

Simple increment of heading level (1-6), without hierarchy checks.

Decrease Heading at Current Line

Simple decrement of heading level. Removes heading at level 1.

Remove Heading

Removes the heading from the current line, preserving the text.

How It Works

The plugin analyzes document structure to determine parent-child relationships between lines based on:

  • Indentation level - Tab-based nesting
  • Heading hierarchy - Parent headings must be lower-numbered than children
  • List context - Maintains consistency within plain headings and unordered bullet lists

Minimum heading level = max(indentation_depth + 1, parent_heading + 1)

Examples

# H1 Parent

    ## H2 Child (min: H2)
        ### H3 Grandchild (min: H3)

Demoting H3 → H4 → H5 → H6 → (removed) Promoting (no heading) → H3 → H4 → H5 → H6

Installation

From Obsidian Community Plugins

  1. Open Settings → Community plugins
  2. Select Browse and search for "Heading Handler"
  3. Select Install, then Enable

Manual Installation

  1. Download main.js and manifest.json from the latest release
  2. Create folder <vault>/.obsidian/plugins/heading-handler/
  3. Copy downloaded files into the folder
  4. Reload Obsidian and enable the plugin in Settings → Community plugins

Usage Tips

  • Assign hotkeys to smart promote/demote for quick heading adjustments
  • Use multi-select to restructure entire document sections
  • The "repeatable" flag on smart commands allows holding down the hotkey

Development

# Install dependencies
npm install

# Build for development (watch mode)
npm run dev

# Production build
npm run build

# Run tests
npm test

Support

If you find this plugin helpful, consider supporting development:

License

MIT License - see LICENSE file for details

HealthExcellent
ReviewPassed
About
Manage headings intelligently based on indentation and parent heading levels, preserving proper hierarchy within plain text and unordered lists. Apply smart promote/demote to single or multi-line selections—clamp or remove headings when changes would violate structure—and remove headings while keeping their text.
FormattingMarkdown
Details
Current version
1.0.5
Last updated
3 weeks ago
Created
11 months ago
Updates
6 releases
Downloads
65
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
Ko-fi
Author
Malte HenrikssonMalte Henrikssongoopii
GitHubgoopii
  1. Community
  2. Plugins
  3. Formatting
  4. Heading Handler

Related plugins

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

Blur

Create obfuscated blocks of text.

Columns

Create columns in Markdown.

Image Captions

Add captions to images with inline Markdown and link support. The caption format is compatible with the Commonmark spec and other Markdown applications.

Paste Reformatter

Reformats pasted text for precise control.

Inline spoilers

Adds Discord-like syntax for inline spoilers.

Importer

Convert your data to Markdown files you can use in Obsidian. Works with Apple Notes, OneNote, Evernote, Notion, Google Keep, and many other formats.

Outliner

Work with your lists like in Workflowy or Roam Research.

Admonition

Admonition block-styled content.

Custom Frames

Turn web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.