Mindmap Mode

approved

by edolon_phantom

Toggle any note into an editable, radial mind map in the same tab. Every edit writes straight back to the original note, and no new files are ever created. - This plugin has not been manually reviewed by Obsidian staff.

59 downloadsUpdated 8d agoMIT

Mindmap Mode

中文说明

Turn any Obsidian note into an editable, radial mind map — the same way you switch to reading mode. Same tab, same file, no new files ever created.

Every edit you make on the map is written straight back into the original .md note as a minimal line edit. Toggle back and your note is still your note.

The canvas handles much like a desktop mind-mapping tool such as XMind or MindNode, except the data never stops being your markdown note.

What it does

  • A view mode, not an export. Toggling swaps the view type on the leaf you are already in, so the same TFile stays open in the same tab. Nothing is generated, copied, or written to a sidecar file.
  • Your outline is the map. Headings nest by level; nested bullets hang under the heading they belong to. What you already wrote is the structure.
  • Opens folded. A map starts at the root plus its top-level branches, each toggle showing how many nodes are hiding behind it. Open one branch and you get one more level, not the whole subtree.
  • Formulas render. $\lambda$ and $$\sum_{i=1}^{n} x_i$$ are typeset with Obsidian's own MathJax. Prices like $5 and $10 are left as prices.
  • Edit on the canvas. Rename, add, delete, indent, drag to reparent, drag to reorder, fold, tick checkboxes — all of it rewrites the note in place.
  • Nothing else is touched. Frontmatter, fenced code, tables, HTML and links are never reformatted. Lines you did not edit come back byte-for-byte identical, including CRLF endings.

Switching to the map

Any of these work, on the note you already have open:

WhereHow
Command paletteToggle mind map view (assign a hotkey to make it feel native)
Note headerThe branch icon beside the other view actions
RibbonThe branch icon in the left sidebar
Context menuRight-click the note → Open as mind map

Toggling back returns you to whichever markdown mode you came from — source or reading.

Editing on the map

InputAction
Double-click / F2Edit the node text inline
on a content cardShow the whole block, rendered
Click a link in a content cardOpen it — note, heading, PDF, attachment or web address
+ beside a cardNew child
Right-click a cardThe node's menu: add a child, add a sibling above or below, fold, rename, delete
EnterNew sibling
TabNew child
Shift+TabOutdent
]Indent under the previous sibling
DeleteDelete the node and its children
SpaceFold / unfold
Arrow keysMove the selection
Drag a card onto anotherReparent it
Drag onto a card's top / bottom edgeDrop it in beside that card, above or below
Ctrl/Cmd+EnterCycle the checkbox: none → [ ][x] → none
Ctrl/Cmd+ZUndo (Shift to redo)
Ctrl/Cmd+0Fit the map to the window
Wheel / pinchZoom; drag blank space to pan
ToolbarZoom, fit, centre, expand all, collapse all, shortcut help

Collapse all returns the map to the view it opened with, rather than hiding everything behind the root.

Dragging across the heading/list boundary converts the moved block for you. Drop a heading onto a bullet and the whole subtree becomes nested bullets; drop a bullet onto a heading and it becomes a top-level list. Checkbox state survives the round trip. Dropping beside a node works the same way: the block is written the way that node is written, because a bullet placed after a heading is that heading's content rather than its sibling.

Top-level branches are not reordered by dragging. The layout splits them between the two sides of the root by weight, so their order is its to decide — a drop anywhere on a top-level card reparents, as it always has. From the second level down, siblings run top to bottom in file order, and the edge of a card is where you change it.

Paragraphs, code blocks and tables

Content that is not a heading or a list item stays exactly where it is in the note — and gets its own card on the map, folding and unfolding with the branch it belongs to, interleaved with its siblings in file order. Code blocks and tables keep a monospace face and their own line breaks; prose is set in the reading face, formulas included.

A card is only a preview: long blocks are clipped on the map, and the map's own renderer is a small inline one. The button in a content card's corner opens the block whole, rendered by Obsidian itself — display formulas, tables, code highlighting and callouts all look the way they do in reading view. Switch that dialog to Source (or double-click the card) to edit the block; saving rewrites only those lines.

Content cards cannot be renamed, dragged or deleted — those lines belong to the note, and the map is only showing them.

Turn Show note content off in the settings to keep them off the map.

Install

Not in the community plugin browser yet, so install manually:

npm install
npm run build

Then copy main.js, manifest.json and styles.css into your vault:

mkdir -p /path/to/vault/.obsidian/plugins/mindmap-mode
cp main.js manifest.json styles.css /path/to/vault/.obsidian/plugins/mindmap-mode/

Enable Mindmap Mode in Settings → Community plugins.

For development, symlink the repo instead so npm run dev rebuilds in place, then use Reload app without saving (or the Hot-Reload plugin) to pick up changes:

ln -s "$PWD" /path/to/vault/.obsidian/plugins/mindmap-mode
npm run dev

A sample vault lives in test-vault/ — open that folder as a vault and symlink the plugin into test-vault/.obsidian/plugins/ to try it without touching your real notes.

Settings

Node source (headings and lists / headings only / lists only), deepest heading level, root node policy, indent unit for new list items, layout (balanced or single-sided), branch colours, whether note content appears as cards, card width, spacing, wheel behaviour, and whether to add the header button.

How the round trip is kept safe

Every operation is a line-range splice on the original text. The map is a projection: each node remembers the exact line it came from and the exact pieces of that line (indent, marker, spacing, checkbox, text, trailing suffix), so it can rebuild itself character-for-character. The file is never regenerated from the tree.

That invariant is enforced by the test suite rather than assumed:

npm test

It checks, among other things, that a parse/serialize round trip is byte-identical across frontmatter, CRLF, tilde and nested fences, ordered lists, empty list items and closing-hash headings; that fenced code never produces nodes; that no operation ever touches frontmatter; and that every legal reparent across a rich fixture still round-trips with code content intact.

Layout is covered too — cards are asserted never to overlap in deep, uneven trees, in both balanced and single-sided modes, and laying out the same tree twice is asserted to land in exactly the same place (the map re-measures without rebuilding once MathJax has flushed its stylesheet). The $…$ delimiter rules live in their own dependency-free module so they can be tested the same way.

Known limits

  • Setext headings (Title underlined with === or ---) are treated as body content, not nodes. They are preserved untouched; ATX (#) headings are what the map reads.
  • The root node is the note's single top-level heading when it has one, and otherwise the file name. A file-name root cannot be renamed from the map, since that would mean renaming the file.
  • Fold state lives in memory and is deliberately not written to the note, so the map never adds anything to your file. The flip side is that it does not survive: opening a different note, or toggling out to markdown and back, re-folds the map to the root and its top-level branches.
  • Inline math uses a stricter $…$ rule than Obsidian's reader — the body may not begin or end on whitespace, and a closing $ may not be followed by a digit. That is what keeps $5-$10 a price, at the cost of $x$2 staying literal.
  • Moving a checkbox item into heading position keeps [x] as literal text (headings cannot hold checkboxes). Moving it back restores a real checkbox.

Development

src/model/     parser + mutation engine — pure functions, no Obsidian imports
src/layout/    tidy-tree layout
src/view/      canvas, cards, connectors, interactions, math, the TextFileView
src/main.ts    plugin: view registration, the mode toggle, commands

src/model and src/layout have no DOM or Obsidian dependency, which is why they can be unit-tested directly with node --test (Node 22.6+ strips the TypeScript types natively — no build step, no test framework).

License

MIT — see LICENSE. Copyright (c) 2026 PHANTOM-Nw.

No third-party code is bundled: there are no runtime dependencies, formulas are typeset by Obsidian's own MathJax, and icons come from Obsidian's setIcon. Neither is redistributed with the plugin.

XMind and MindNode are trademarks of their respective owners; this project is not affiliated with either and mentions them only to describe how the canvas behaves. Obsidian is a trademark of Dynalist Inc.

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.