Nested Ordered Numbering

approved

by spark

Create and maintain hierarchical plain-text numbering with a trailing period at every depth. - This plugin has not been manually reviewed by Obsidian staff.

140 downloadsUpdated 9d agoMIT

Nested Ordered Numbering

CI Release License: MIT Obsidian 1.5+

Wiki · Usage · Development · Publishing · Issues

Create and maintain plain-text hierarchical numbering in Obsidian with a required trailing period at every depth.

1. First item
  1.1. Child item
    1.1.1. Grandchild item
  1.2. Another child
2. Second item

Unlike standard Markdown ordered lists, this plugin owns the entire numeric prefix. 1.1. and 1.1.1. are treated as text numbering rather than Markdown list markers.

Why this plugin?

Markdown only recognizes a single integer such as 1. as an ordered-list marker. Nested Ordered Numbering manages the complete hierarchy as readable plain text, keeps the required final period at every depth, and recalculates the surrounding block in one undoable editor transaction.

Features

  • Always emits 1., 1.1., 1.1.1., and deeper forms with a final period.
  • Enter creates the next item at the same depth when the current item has content.
  • Enter on a prefix-only item such as 1.3. removes the prefix and leaves one plain blank line, so the next input can be ordinary text or a Markdown heading.
  • Tab indents the current item or selected subtree.
  • Shift+Tab outdents a subtree; at the root it converts the item to plain text.
  • Multi-line selections are supported.
  • Insert, delete, and renumber commands update the related contiguous block.
  • Blank lines may separate items inside one numbered block; ordinary text still starts a new block.
  • Each operation uses one editor transaction, so one undo restores the entire edit.
  • Recognized numbering is handled before conflicting Outliner keymaps.
  • Legacy four-space or tab-indented blocks normalize automatically.
  • Live Preview neutralizes Obsidian's Markdown-list and indented-code offsets on recognized lines, so the first, second, and deeper Tab levels stay uniform.

Fixed-width hierarchy layout

Each additional numeric component adds two visible characters (.1). The plugin therefore uses two leading spaces per hierarchy level. The combined result moves the content start by exactly four columns per level:

1. text             content column 3
  1.1. text         content column 7
    1.1.1. text     content column 11
      1.1.1.1. text content column 15

Run Renumber nested ordered block on an existing block to normalize older four-space indentation immediately.

Obsidian normally treats 1. as a Markdown list marker and four leading spaces as a list continuation or code block. styles.css and a parser-scoped editor decoration remove only those visual offsets from recognized numbering lines.

Keyboard controls

KeyAction
EnterCreate the next sibling; on a prefix-only item, exit numbering
TabIndent the item/selected subtree
Shift+TabOutdent, or remove numbering at root
Ctrl+ZUndo the complete operation

Ctrl+P is Obsidian's Command Palette shortcut. Open it and search for Nested Ordered Numbering to run the same Insert, Delete, and Renumber commands. To avoid conflicts, the public plugin does not claim default shortcuts. Assign your preferred keys under Settings → Hotkeys; Ctrl+Alt+N/D/R are suggested choices.

Parser contract

The trailing period and following whitespace are mandatory:

^[\t ]*(\d+(?:\.\d+)*\.)[\t ]+

Recognized: 1. item, 1.1. item, 12.3.7. item Ignored: 1 item, 1.1 item, 1.1.1 item

Installation

Community directory

This section becomes applicable after the plugin is accepted into the Obsidian Community directory.

  1. Open Settings → Community plugins → Browse.
  2. Search for Nested Ordered Numbering.
  3. Select Install, then Enable.

Manual installation

  1. Create .obsidian/plugins/nested-ordered-numbering/ in a test vault.
  2. Copy main.js, manifest.json, and styles.css from a matching GitHub release.
  3. Reload Obsidian and enable the plugin under Community plugins.

For screenshots, detailed examples, troubleshooting, and marketplace information, visit the project Wiki.

Privacy and security

Nested Ordered Numbering is local-only. It has:

  • no network requests;
  • no telemetry or analytics;
  • no accounts, payments, or advertising;
  • no access to files outside the active Obsidian vault;
  • no self-update or dependency-install behavior at runtime.

Development

Requirements: Node.js 22.13+ and pnpm 11.

pnpm install
pnpm test
pnpm lint
pnpm build
pnpm release:check

main.js is generated locally and intentionally excluded from the source branch. Each GitHub release publishes the built main.js together with manifest.json and styles.css, which are the files Obsidian installs.

See Development, Usage, and Publishing for details.

Release status

Release 0.3.4 is the current Community directory submission candidate. Its release assets are rebuilt from source by GitHub Actions. Run the release gate before every future tag as described in Publishing.

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.