AArlert180 downloadsAutomatic heading numbering with fully customizable templates, per-folder rules, whitelist and backlink sync. Bilingual UI (English / 中文).
English | 简体中文
Automatic heading numbering for Obsidian — the kind that survives editing, renaming, and reorganizing your notes.
You insert a section in the middle of a long document, and now every number after it is wrong. Manually renumbering 2.3 → 2.4 → 2.5 … across a 40-heading spec or a semester's worth of lecture notes is tedious and error-prone. Auto Headings recomputes the whole file automatically, every time you stop typing.
You rename a numbered heading, and every [[note#heading]] link pointing at it breaks. Most numbering plugins only touch the number and leave the link text stale. Auto Headings' backlink sync rewrites every reference across your vault in the same edit — rename the text, not just the number, and links still resolve.
One numbering style never fits your whole vault. Meeting notes want 1 / 1.1 / 1.1.1. A book manuscript wants 第一章 / 一、. An academic paper wants to skip "Contents" and "References" from the count entirely. Auto Headings lets every folder — even every file — use its own template, with a whitelist for the headings that shouldn't be numbered at all.
Install it and you get 1 / 1.1 / 1.1.1 numbering the moment you edit a note — zero configuration. Then customize as much or as little as you need.
Everything below is what you get the moment the plugin is enabled, before you open the settings panel once.
1 / 1.1 / 1.1.1 numbering the moment you edit — no setup needed.#/##/###. Multiple top-level # H1s in one file are left alone and treated as section boundaries (numbering under each one restarts).Ctrl/Cmd+Z undoes it, and your cursor position is preserved.obsidian-auto-headings: true or false to a note's frontmatter to override that toggle for one file — force it on while everything else stays untouched, or force it off for a file you don't want the plugin near. The Renumber now command ignores both: typing a command is explicit enough intent to skip every switch and renumber immediately.isDesktopOnly: false).obsidian-auto-headings: true/false in frontmatter to force-enable/disable a single file. The command Renumber now bypasses all switches.Once the defaults aren't enough, this is what you reach for.
Most heading-numbering plugins update the number but leave stale link text behind. This one keeps them in sync.
<!-- note.md, before -->
## 1 Foo
<!-- other.md -->
See [[note#Foo]] for details.
You edit the heading — text, not just the number:
<!-- note.md, after -->
## 2 Foobar
The reference updates itself, automatically, in the same edit:
<!-- other.md -->
See [[note#Foobar]] for details.
No broken anchors, no manual find-and-replace across your vault. The approach builds on Header Enhancer, the only other plugin that tackles this problem, with several targeted improvements layered on top — atomic writes so an interrupted update can't half-corrupt a file, safer handling of duplicate headings, and more. (A few edge cases — duplicate heading names, block references, multi-level anchors — are left untouched on purpose; see Notes.)
On by default, with a one-time explanatory notice the first time it actually rewrites a link. Can be turned off in Settings → General if you'd rather manage links yourself.
Every heading level (H1–H6) has independent control over:
第1章)1), Chinese (一二三), circled (①②③), lowercase/uppercase letters, lowercase/uppercase Roman numerals. in 1.1) and title separator (the space between the number and your heading text)1.1.1); turn it off for a level to show only that level's own numeral (e.g. a) instead of 1.a))1.a.①). Chinese-book style wants the opposite: the chapter heading itself reads 一, but drops to Arabic the moment it becomes an ancestor inside a section number (一 at H2, 1.1 at H3). A single numeral setting can't satisfy both directions at once, so ancestorNumeral controls just the ancestor segments, independent of how a level renders on its own.All of it previews live as you type, so you see the exact heading format before it's ever written to a file. Create as many named templates as you like (rename, edit, or delete them from the settings panel).
A path-rule table maps folders and individual files to a named template, most-specific match wins (a file-level rule beats its parent folder's rule). Use academic numbering in /papers, chapter-style numbering in /book, and the default 1 / 1.1 everywhere else — all in the same vault, no manual switching. The rule table supports drag-to-reorder, path autocompletion from your actual vault structure (browse folders level by level, or type to fuzzy-search), and warns you if you haven't set a root (/) fallback rule while global auto-numbering is on.
Two rule-level tools round this out: pick the pseudo-template "No numbering" to switch numbering off for a whole folder (no more per-file frontmatter flags — existing numbers are left frozen, not stripped), and use the per-rule batch renumber button to renumber every file the rule matches in one confirmed action (each file uses its own effective template; files opted out via frontmatter or containing foreign numbering are skipped).
Headings like "Contents", "Appendix", or "References" shouldn't get a number and shouldn't consume a slot in the counter. The whitelist (configured per template) handles this with three match modes:
Resetting the counter after a subtree block, rather than continuing where it left off, is the default behavior, not a setting you have to find — a survey of academic and technical citation conventions (APA, Chicago, IEEE, RFC, GB/T 7714) found that roughly 85% of them break numbering after an appendix-like block and restart afterward.
The default template ships pre-populated with common structural terms in both English and Chinese (Contents, Appendix, Figures, Tables, References, Acknowledgments, Abstract, Index, and their Chinese equivalents).
The editor itself is built for quick tweaking, not just a flat list:
= exact / ≈ partial / ▸ subtree) right on the row — one click to switch, with a bilingual tooltip explaining each icon1. prefixes, imported document numbering, etc.) while leaving the plugin's own numbering untouched — the tool for taking over a document you didn't originateTo tell its own numbering apart from your text, the plugin ends every prefix with an invisible Word Joiner character (U+2060): ## 1 My heading. This is what makes it safe — headings that merely look numbered (2024 Review, API design) are never mistaken for old numbering and eaten.
The idea of marking prefixes with an invisible Unicode character traces back to gurjar1/auto-heading-obsidian. This plugin adds a second safeguard on top of it: since 0.7.20 the marker sits at both ends of the prefix, not just the end. If you delete the trailing one while editing — say, trimming a suffix — the leading one survives as proof a plugin prefix was there, so the next renumber heals the line instead of either duplicating the number or guessing wrong.
What this means for you:
grep your files for exact heading text, be aware it sits between the number and the title — searching for "1 My heading" as one contiguous string will not match.page.file.headers reads the raw heading text including this character, so an exact-match query like WHERE file.headers = "1 My heading" will silently return nothing. Strip it before comparing — in DataviewJS: dv.current().file.headers.map(h => h.replace(//g, "")) — or match with .includes() against just the title fragment instead of the full numbered string..replace(//g, "") in the destination app if needed).The numbering is real text, so it travels with your documents. Where each egress path stands:
--number-sections yields double numbering like 1 1 Introduction. Either run the clear command before exporting, or drop the ready-made Lua filter from the marker character contract into your pipeline to strip whole prefixes in one pass.From the community plugin store: already listed and searchable — Settings → Community plugins → Browse → search "Auto Headings", then install and enable directly. It has passed the store's automated checks; Obsidian's manual/editorial review is still pending (this doesn't affect installing or using the plugin).
Manually: download main.js, manifest.json, styles.css from the latest release into <vault>/.obsidian/plugins/auto-headings/, then reload Obsidian and enable the plugin.
Number Headings has been unmaintained for roughly 2.5 years. Migrating takes three steps:
1.1.1 is close to its style; path rules can assign different templates per folder);Its two longest-standing open requests — excluding folders from numbering, and skipping headings inside comment blocks — are both on this plugin's roadmap.
| Command | What it does |
|---|---|
| Renumber now | Renumber the current file immediately, bypassing all switches |
| Clear numbering in current file | Strip all numbering prefixes (including hand-written ones) |
| Clean foreign numbering | Strip only numbering not written by this plugin — use it to take over imported documents |
^id), and multi-level anchors (#A#B). Turning the sync on doesn't retroactively fix links that were already broken before it was enabled. It can also be turned off in Settings → General.Ctrl/Cmd+Z undoes them. Backlink updates to other files are not part of that transaction. The vault-wide clear is not in the undo history; back up first.isDesktopOnly: false).The only things this plugin ever writes into your files are numbering prefixes and two invisible marker characters — all fully removable:
obsidian-auto-headings keys from frontmatter — they're inert without the plugin.Because the marker lives in the file bytes themselves, even years after uninstalling you can reinstall the plugin and run the vault-wide clear to strip its old numbering precisely; for external batch cleanup without reinstalling (a one-liner), see the marker character contract.