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

-, *, and + bullet list itemsIncreases 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.
Decreases heading level intelligently. When a heading reaches its minimum valid level (based on parent + indent), further demotion removes the heading entirely.
Simple increment of heading level (1-6), without hierarchy checks.
Simple decrement of heading level. Removes heading at level 1.
Removes the heading from the current line, preserving the text.
The plugin analyzes document structure to determine parent-child relationships between lines based on:
Minimum heading level = max(indentation_depth + 1, parent_heading + 1)
# H1 Parent
## H2 Child (min: H2)
### H3 Grandchild (min: H3)
Demoting H3 → H4 → H5 → H6 → (removed) Promoting (no heading) → H3 → H4 → H5 → H6
main.js and manifest.json from the latest release<vault>/.obsidian/plugins/heading-handler/# Install dependencies
npm install
# Build for development (watch mode)
npm run dev
# Production build
npm run build
# Run tests
npm test
If you find this plugin helpful, consider supporting development:
MIT License - see LICENSE file for details