Auto Heading Plugin: Real-time heading numbering and visual indentation

Disclaimer

Is this project open source? Yes
Is this project completely free? Yes
Is this project vibe-coded beyond the author’s ability to comprehend how it works? No
Community Directory: “Auto Heading” by gurjar1


Auto Heading is a community plugin designed for real-time heading numbering and document hierarchy formatting that works seamlessly across both Reading view and Live Preview.

How to Install

  1. Open Obsidian Settings.
  2. Go to Community Plugins and select Browse.
  3. Search for “Auto Heading” by gurjar1.
  4. Click Install, then Enable.

Why Auto Heading is Needed

Legacy solutions (like the Number Headings plugin) have not been updated in years. This leads to common formatting issues, especially when reordering sections or trying to use them on notes that already contain manually written numbers.

Auto Heading solves these issues with the following features:

  • Smart Manual Number Detection: Replaces existing manual numbering (e.g., “1. Introduction” or “A. Methods”) cleanly without breaking formatting.
  • No False Positives: To avoid breaking content numbers (e.g., “5 options for X”), the plugin tags its own generated numbers with an invisible Unicode marker (U+2060).
  • Burn-in vs. Decoration Modes:
    • Burn-in: Writes numbers directly into the Markdown file in real time (so they appear in the sidebar TOC, PDF exports, and Obsidian Publish).
    • Decoration: Overlays numbers visually in the editor, keeping the raw Markdown file clean.
  • Visual Indentation: Shifts headings to the right according to their level to create a clear tree-like outline in the editor. Includes customizable spacing and vertical guide lines.
  • Flexible Styles: Assign Arabic numerals (1, 2, 3), letters (A, B, a, b), or Roman numerals (I, II, i, ii) to different heading levels (e.g. 1.A.a.I).
  • Per-Note Customization: Override styling, skip headings (using ), or toggle options directly in a note’s YAML front matter.
  • Full Undo Support: Real-time numbering changes integrate with Obsidian’s undo history (Ctrl+Z).

Quick Start Setup Options

Once installed, open settings (Settings > Auto Heading) and choose how you want to apply the numbering. You do not need to manage front matter unless you want to.

Option A: Automatic Scoping (No front matter required)

  • Specific Folders or Notes: In the settings, enable “Selected folders / notes” and add the specific folders or files you want the plugin to target.
  • Vault-wide: Enable “All notes in vault” in the settings to automatically number every note in your vault.

Option B: Front Matter Opt-In

  • Enable “Notes with front matter” in the settings, then add this to the top of any note you want to number:

    ---
    auto-heading: auto
    ---
    
  • For advanced users, you can override global styles or settings inside any note’s front matter:

    ---
    auto-heading: auto, skip-h1, style 1.A.a, indent, indent-guides
    ---