Fold Unfold Headings

approvedunreviewed

by leondgarse

Fold note content under headings to get an outline view, or show only headings up to a chosen level.

↓ 64 downloadsUpdated 1mo agoMIT

Fold Unfold Headings

Fold a note down to its headings, like the code editor shortcut "fold to level N" (for example Ctrl+K Ctrl+2 in Pulsar / Atom / VS Code).

Commands

CommandResult
Fold all content to its own headingEvery heading stays visible and the text under each heading is folded. The note reads like the Outline view.
Fold to heading level 1 … 5Only headings of that level or higher stay visible. For example, level 2 shows # and ## headings and folds everything else.
Unfold allRemoves every fold in the note, including the ones made by this plugin.

Each fold command first unfolds everything, so you can switch between levels directly.

Headings inside fenced code blocks and the frontmatter are ignored.

Hotkeys

The plugin sets no hotkeys. Assign them in Settings → Hotkeys by searching for "Fold", for example:

  • Ctrl+Alt+0: Fold all content to its own heading
  • Ctrl+Alt+1 … 5: Fold to heading level 1 … 5
  • Ctrl+Alt+U: Unfold all

Installation

Manual

  1. Download main.js and manifest.json from the latest release.
  2. Put them in <vault>/.obsidian/plugins/fold-unfold-headings/.
  3. Reload Obsidian and enable Fold Unfold Headings in Settings → Community plugins.

Releasing

  1. Bump version in manifest.json and add it to versions.json.
  2. Commit, then push a tag with the exact version, for example git tag 0.1.1 && git push origin main 0.1.1.

The release workflow creates the GitHub release and attaches artifact attestations for main.js and manifest.json.

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.