Josip Markus174 downloadsFold and unfold the active note's outline to a chosen depth (levels 1-6) with hotkey-bindable commands.
An Obsidian plugin that folds and unfolds the active note's outline to a chosen depth — "fold to level 1, 2, 3 …" the way OmniOutliner, Workflowy, and Dynalist do. Obsidian's core folding is otherwise all-or-nothing plus a per-node toggle; this plugin fills the gap so you can move through large nested outlines fast.
From Obsidian: In Settings → Community plugins → Browse, search for "Outline Level Fold", then install and enable it.
From GitHub: Download main.js and manifest.json from the latest release into YourVault/.obsidian/plugins/outline-level-fold/, then enable the plugin in Settings → Community plugins.
Seven commands, all bindable to hotkeys under Settings → Hotkeys (search "Outline Level Fold"):
| Command | Effect |
|---|---|
| Fold to level 1 … 6 | Keep outline levels 1..N visible; collapse everything deeper |
| Unfold all (show every level) | Expand the entire outline |
Each "Fold to level N" command is absolute, not a toggle — it always lands on the same view regardless of the current fold state, so a hotkey per level lets you jump straight between depths.
With text selected, the same commands act only on the selected lines instead of the whole note — so you can fold one branch or a portion of an outline and leave the rest untouched. Inside a selection, levels are relative to what you selected: the shallowest selected line is level 1, so "Fold to level 2" shows the top two tiers of the selection.
This works on any space- or tab-indented outline. It does not work inside fenced code blocks — Obsidian doesn't render folds inside a code block — so a directory tree written in a code block can't be folded this way.
Recommended scheme:
Opt+Cmd+1 … Opt+Cmd+6 → Fold to level 1-6Opt+Cmd+0 → Unfold allCmd+1-6 is tempting but commonly conflicts with other bindings, so the Opt+Cmd chord is the safer default. The Hotkeys panel flags any conflict inline.
A status-bar item (bottom edge of the window) shows the current outline fold depth:
Outline: L2: Uniformly folded to a level; 2 is the deepest level still visible.Outline: Mixed: Folds are present but uneven — a scoped or partial fold left different parts at different depths.Outline: All: Fully expanded, nothing folded.It is computed live from the editor's fold state, so it also reflects folds you make by hand with the gutter triangles. It clears in reading mode and on notes with no outline structure.
#) is its depth, on the same scale.List indentation is the primary signal — the plugin is built for deeply nested bullet outlines — and heading-based outlines fold too.
Enable Obsidian's core folding so the editor maintains fold state:
The plugin drives Obsidian's native CodeMirror fold state directly and never edits your note's text. It acts on the active note in editing or live-preview mode; in reading mode the commands do nothing.
Independent of the Outliner community plugin. It uses only Obsidian's core CodeMirror folding and touches none of Outliner's state, so it works the same whether Outliner is enabled or disabled, and does not conflict with it.
Built with TypeScript and bundled with esbuild.
npm install # install dev dependencies
npm run dev # watch build (writes main.js on change)
npm run build # type-check + production bundle
The @codemirror/* packages are kept external — Obsidian provides them at runtime.
Desktop only.
Built on Obsidian's native CodeMirror 6 code-folding API (@codemirror/language). The fold-state approach follows the same mechanism Obsidian uses for its own heading and list folding.
MIT — see LICENSE. You are free to use, modify, and redistribute it.