jackweigogoga6k downloadsEdit Markdown notes as XMind-style mind maps. Headings and list items become nodes, and edits on either side stay in sync.
English | 简体中文
An XMind-style mind map plugin. Markdown is the single source of truth: headings and list items are the nodes, and the mind map view is just another editor for the same .md file, so edits on either side show up on the other. No runtime dependencies; works on both desktop and mobile.
The interface follows Obsidian's language setting — English, or Simplified Chinese when Obsidian is set to Chinese.


Settings → Community plugins → turn off Restricted mode → Browse, search for gogoga Mind Map, install it, then click Enable. Updates show up there too.
For offline machines (such as a company network) or to pin a specific version:
main.js, manifest.json, styles.css under Assets. Don't download the Source code archives: they are the source code, which Obsidian can't load..obsidian/plugins/, create a folder named gogoga-mindmap, and put the files in it, so you end up with paths like <vault>/.obsidian/plugins/gogoga-mindmap/main.js..obsidian is a hidden folder: press ⌘ ⇧ . in Finder on macOS; on Windows, tick Hidden items under View in File Explorer.On phones, where moving files around is awkward, use the community plugins browser.
[!tip] For a quick start, copy the
examples/folder into your vault (the notes are in Chinese). Mind Map 使用指南 (Mind Map user guide), opened as a mind map, is a clickable, foldable map of every feature, demonstrated by the plugin itself. 脑图代码块嵌入示例 (code block example) is an ordinary note withmindmapblocks embedded in it. The folder also has a typical mind map, a meeting note with an embedded map, and an.xmindfile to try the import.
mindmap: true to the frontmatter of any note. To start new maps from your own structure, pick a note in the "Template for new mind maps" setting: its content is copied in, with {{title}}, {{date}} and {{time}} (also {{date:YYYY-MM-DD}} with a format) filled in like the core Templates plugin, and mindmap: true added to its frontmatter. Leave it empty to start with Topic 1/2/3.mindmap: true; a pinned map tab stays put.
Switching a regular note to a mind map adds mindmap: true so it keeps opening that way; turn off Remember the mind map view in settings to switch only the current tab and leave the file alone.
To write and watch side by side, use Markdown and mind map side by side (command palette, the file context menu, the ⋯ menu of a mind map tab, or right-click on empty canvas): Markdown on the left, the map on the right, following your typing as you go. It works from either view; a mind map note that is showing as a map switches to Markdown on the left. Nothing is written to the file.```mindmap code block containing the same kind of Markdown, and it renders as a small mind map in both Reading view and Live Preview.
It's read-only by default. Click the pencil in the toolbar or double-click a node to start editing. Changes are written straight back into the code block, and undo and redo only apply within the block.
Turn on "Hide the toolbar of embedded maps" (off by default) for a cleaner look: embedded maps (code blocks and ![[note]] embeds) show no toolbar in reading view, and in editing view it appears only while the mouse is over the map or while you edit it..xmind file in your vault and open it directly: it renders read-only, you can switch between sheets, and one click in the top-right corner does Convert to Markdown note.
Both content.json (XMind Zen / 2020 and later) and content.xml (XMind 8) are supported. Boundaries, summaries (including topics hanging off a summary), callouts, relationships and floating topics on the central topic come along; comments aren't supported yet, and a note in the top-right corner says how many were left out.Any note can hold a small mind map: write a mindmap code block with the same Markdown a mind map note uses. It renders in Reading view and Live Preview, and you can edit it in place (click the pencil or double-click a node).
The block can also be named gogoga-mindmap; it works the same. If you also use Markmind, which claims mindmap blocks too, turn off "Render ```mindmap code blocks" in settings to leave mindmap to Markmind and use gogoga-mindmap for your own maps.
```mindmap
# This week
## Product
%%blue%%
- 1️⃣ Requirements review
- 2️⃣ Prototype walkthrough
## Engineering
%%green%%
- ⏳ API integration
- ✅ Analytics shipped
## Risks
%%red%%
- ❗ Design not final
```
A block can carry its own frontmatter that applies only to that block, for example a different structure and theme:
```mindmap
---
mindmap-structure: org-down
mindmap-theme: business
---
# Release
## Test
## Regression
## Canary
## Rollout
```
To show a mind map you already have, embed the file like any other note: ![[Product launch]] for a mind map note, or ![[Competitors.xmind]] for an XMind file. It shows a read-only preview that follows the file as it changes; click the open button in its toolbar, or double-click a node, to open the file and edit it. Point at a node to show only that branch: ![[Product launch#Timeline]] (a heading path like #Team#September works too) or a block reference ![[Product launch#^abc123]]; a breadcrumb lets you step back up to the whole map. Add a zoom to the link, ![[Product launch|80%]], to open it at 80%; otherwise an embed you zoomed opens at that zoom next time. By default the wheel scrolls the note until you click the embedded map, then pans it (Ctrl / ⌘ + wheel zooms at any time); the "Mouse wheel over embedded maps" setting switches back to always panning. Dropped onto a Canvas, a mind map note fills its card and refits when you resize it. Notes without mindmap: true embed as usual.
Since a mind map is plain Markdown, any AI that can write a note can write a map. skills/gogoga-mindmap/SKILL.md tells it the rest: which lines become nodes, the frontmatter for structure and theme, and how to write colors, folding, boundaries, summaries and callouts. In Claude Code, or another tool that supports Agent Skills, copy the skills/gogoga-mindmap folder into its skills folder (for Claude Code, ~/.claude/skills/), then ask for a mind map of a topic or a note. With other AI tools, paste the file's content into the conversation as instructions.
#ff8800 (which stay fixed), separated by commas. If it gets in the way of clicking nearby nodes, turn off "Floating toolbar on selected nodes" in settings; the same actions are in the context menu.[[Links]] in a note open when clicked (⌘/Ctrl-click for a new tab) and show a page preview on hover. To remove a note, right-click the node → Delete note. Turn on "Preview notes while editing" (off by default) to see the rendered note next to the text box as you type (below it when the window is narrow).![[book.pdf#page=…&rect=…]]) shows as the cropped image, resizable and viewable full-size like other images; the ↗ button in its corner (shown on hover or when selected) jumps back to that spot in the PDF (crops need PDF++; without it they show as a link to the page). To excerpt in a row, run Toggle PDF auto-excerpt into this mind map: every link PDF++ copies is then added under the selected node with no pasting, the selection stays put, and clicking another node sends the next ones there. With Auto-copy on in PDF++, making a selection is enough. The highlighted button in the view header stops it.%%num%% after their parent heading. With "Start numbering by typing 1." on, typing "1. " at the start while editing also starts numbering.%%table%% added after the node; for a node that holds only a table, right-click → Insert ▸ Child node with a table (no title needed); the menu of the table's top-left button can delete the table and keep the node; for a node whose note already has a table, right-click → Insert ▸ Show table in node, and More ▸ Move table back to note / Delete table. The rest of the note stays a note. Tables are read-only while the map is locked. Columns you haven't resized are at most 240 wide and wrap their text; a table larger than "Maximum width / height of tables in nodes" (640 / 480 by default, on the Notes settings page) scrolls inside the node with its header kept at the top; scrolling anywhere on such a node scrolls only the table, and the node stays put.state.json in the plugin folder, separate from the settings, not in your notes. PNG/SVG exports include the expanded notes.%%…%% markers (width, folding, callouts…) unless you turn on "Copy nodes without map markers"; pasting back into a map restores them either way.
The other way round, paste a list, headings, or plain text lines, and they become children of the current node, following their structure.==highlights==, strikethrough, inline code, text colors and highlighter colors render in place and their markers (**, <span …>) are hidden. Markdown markers like ** and == show when the cursor is on them and stay visible while you select; color tags always stay hidden so the node doesn't reflow, so change colors with the format bar or commands, or switch to Markdown to see the source. Turn on Keep format marks hidden while editing (off by default) to keep bold and highlight markers hidden too, so the line width doesn't jump when the cursor is next to them. Deleting never splits a hidden marker pair: Backspace after formatted text removes its last character, and the markers go once it is empty. Links, math and images still show their source while editing. Callouts, summaries, relationship labels, boundary titles and renaming in the outline panel use the same editor.<br> in the heading or list item and renders normally in Reading view.state.json, not in the note.
In the panel: ↑↓ to move, Tab / Shift+Tab to demote / promote, Alt+↑↓ to reorder, Enter to add a sibling and rename it in place, Delete to delete, Space to fold.
On the canvas, Alt+arrow keys likewise reorder, promote, and demote.[[note|original text]], and a newly created note opens in a split on the right. Press ⌘K again on a linked node to open or remove the link. Hold ⌘ and hover for a page preview.[[ (or 【【 with a Chinese input method) and a list of vault files pops up; keep typing to filter, ↑↓ to pick, Enter to insert [[note]]. Or select some text and type [ (or 【) to wrap it in brackets; type it again to turn it into a [[link]].mindmap-edge, mindmap-edge-dash, mindmap-edge-corner in the frontmatter).mindmap-theme and applies per file; the Default theme setting changes the theme for new files. Every theme has a dark mode.$E=mc^2$ in a label renders as math, and $$…$$ renders in display style. For multi-line formulas use \begin{aligned}…\end{aligned} with \\ line breaks, or put a $$ block in the note. ![[image.png|160]] or  renders as a thumbnail, where the number is the width; select it and drag the handle in the bottom-right corner to resize (the size of images without a width, and how wide you can drag, are the "Default image size" and "Maximum image width" settings on the Opening and display page). Double-click an image to view it full size (click or press Esc to close). Code blocks in notes get syntax highlighting. Math and images are embedded when exporting PNG/SVG.==Highlights== (or <mark>highlights</mark>) in nodes hide their text but keep their highlight color, with a line under them, and you click to reveal; a node whose children are written as [x] right answer / [ ] wrong answer becomes a quiz question: every question gets a "Single" or "Multiple" tag (one or more right answers), and all options look unchecked until you click the tag, then right answers turn green and wrong ones fade. Clicking the question itself just selects it. Children of the options (say, the reasoning) stay covered until the answer is revealed. Mark a node with 🙈 (the Recite group in the marker picker) to make it an answer: in recite mode it is covered along with its children, images, notes and callouts included, until you click it, and clicking again covers it back. That works for screenshot questions too: put the question image in one node and the answer image in a 🙈 child.%%rel=r1 "Text"%% on the start node and %%id=r1%% on the end node (plus c=40,-60 for a dragged curve, or c1=40,-60 c2=-30,-50 once the handles have been dragged), so renaming or moving either node never breaks the line.%%summary=2 "Text"%% on the first node, plus sw=240 for a dragged width; included in PNG/SVG exports.- Notes %%summary-topic=2%% (=2 is how many preceding siblings it covers), with its subtopics written under it as usual; the outline panel lists it in that spot too.%%hide%%, and you can also type that yourself. When a map has hidden nodes, the toolbar shows Show hidden nodes (also a command): turn it on to see them faded with a dashed outline, and right-click → More → Unhide to bring one back.state.json, not in the note). Stored as %%callout "Line one<br>Line two"%% on the node (with cc=yellow after it when the callout has a color); straight double quotes become curly quotes. Search finds callout text, PNG/SVG exports include visible callouts, and callouts in .xmind files are imported. Callouts live in a %% comment, so they don't show in Markdown reading view.%%float x=320 y=-80%% marker, so it stays readable in Markdown; it's hidden while focusing a branch. Lines between floating topics aren't supported yet, and the main map doesn't push floating topics aside as it grows.%%w=240%%. Turn on Resize width from the right edge on hover (off by default) to drag or double-click the edge of any node without selecting it first.[ ] item renders as a checkbox; clicking cycles between incomplete, complete, and removed.#tag in a node renders in tag style; clicking it opens global search.[text](https://…) or a bare pasted URL becomes a link that opens in the browser when clicked. Trailing punctuation isn't swallowed into the link.<iframe …> copied from Bilibili or YouTube straight into a node and it renders as a player. Only the iframe tag is accepted, and src must be http(s). Attributes are parsed separately and the element is built with the DOM API, never innerHTML. Autoplay is off by default (autoplay=0 is added at render time without touching the note; write autoplay=1 yourself if you want autoplay), and players in collapsed branches aren't loaded. Embeds also work in notes, rendered by Obsidian's own renderer.
A shield covers the player: a single click only selects the node, and the player is released only when you double-click it or click the Activate button in the bottom-right corner, so a stray click doesn't send you to the source site. An activated node gets a dashed outline and is deactivated when you click elsewhere.
When selected, drag the handle in the bottom-right corner to resize (aspect ratio is locked by default; hold Shift to change height only; double-click to reset to 560×315).[[link]] child. Dropped or pasted images (⌘V, the context-menu Paste, or the toolbar paste button, e.g. a screenshot or an image copied from a web page) are saved to the attachment folder and become image nodes. Right-click an image node and choose Copy image to put the image itself on the clipboard, ready to paste into other apps. While editing a node, select text and paste a web address or a local file path to turn it into a [text](address) link; turn on Fetch page titles for pasted links to have an address pasted with nothing selected use the page title as its text.[[note#heading]]; list nodes get a block ID added automatically and give [[note#^id]], which you can reference from other notes. Clicking such a link in a map selects and centers the node it points to (unfolding its parents), and links from other notes open the map at that node.<span style="color:#e03e3e">text</span> and <mark style="background:#ffd43b99">text</mark> (the same as the Highlightr plugin), so Markdown shows the colors too; recite mode covers highlighter colors like ==highlights==.<u>text</u>, so Markdown shows the underline too.<span style=…>, <mark style=…> or <u> tag once the cursor goes into colored, highlighted or underlined text. With this on the tags stay hidden and the formatting shows instead, as in the node editor; deleting or typing next to them keeps the tags paired. Source mode, code blocks, math and frontmatter are left alone.mindmap in its frontmatter) is open as Markdown, Live Preview shows the whole %%…%% marker that stores colors, folding and relationships at the end of a line in gray. Switch to "Small dot" (hover it to see the text, click it to edit) or "Hidden" (nothing shows; edit it in source mode or in the mind map). A heading's marker sits on its own line right below the heading; while hidden, that line takes no space and the dot goes at the end of the heading. Markers have to stay where they are for the mind map to read them, so while hidden, typing at the end of the line (IME included), Enter, Backspace and joining lines keep text before them and new lines after them; deleting a whole line deletes its marker too, and moving a heading up or down with "Move line up/down" takes its marker line along. Ordinary comments that aren't markers (like %%revisit%%) are left alone.==🔴text== (🔴🟠🟡🟢🔵🟣 right after the opening ==; the square 🟥🟧🟨🟩🟦🟪 work too), show in nodes in the theme's highlight colors without the emoji. While editing, the emoji is hidden like == and shows when the cursor is on it. To write them from the format bar or the "Highlighter color" commands, add emoji like 🔴 🟢 to "Highlighter colors", mixed with hex values if you like; "Clear text and highlighter colors" turns a colored highlight back into a plain one.---
mindmap: true
mindmap-structure: mindmap # optional: logic-right (default) | mindmap | org-down | tree-right | timeline-h | timeline-h-alt | timeline-v-right | timeline-v-left | timeline-v-alt
mindmap-theme: rainbow # optional: snow (default) | rainbow | business | warm | mono | line | forest
---
# Central topic ← the only H1; the file name is used if there is none (or always, with "Use the file name as the central topic" on)
A paragraph here becomes the central topic's note.
## Main topic
%%green%% ← %%color%% colors a node and is invisible in Reading view
### Subtopic
- Deeper levels use lists
- One level deeper
- Fold state is stored in the file too %%fold%%
red orange yellow green teal blue purple pink gray, or #hex.[[note#Heading]] links keep working. The older style with the marker at the end of the heading line is still read; it is moved to the next line when you change that node in the map, and links elsewhere that included the marker ([[note#Heading %%fold%%]]) are updated. List items keep the marker at the end of the line.%%left%% / %%right%%, so the other branches stay put.%%box%% frames the node and its branch, %%box=3%% also takes in the next two siblings, and %%box "Title"%% adds a title. Summaries work the same way: %%summary=2 "Text"%%; a summary with subtopics goes on the item right after the last node it covers: %%summary-topic=2%%; callouts are %%callout "Text"%%, with <br> for line breaks and cc=red (or a hex color) for the fill color. A floating topic is a child of the central topic marked %%float x=320 y=-80%% (position relative to the central topic). A relationship is %%rel=r1 "Text"%% on the start node pointing to the node marked %%id=r1%%, with c=40,-60 after it for a dragged curve, or c1=… c2=… (relative to the start and end node centers) once the handles have been dragged; a node can have several rel=.mindmap code blocks. If a merge can't be made exact, the plugin falls back to writing the whole note in its own format, as earlier versions did.| Key | Action |
|---|---|
| Tab | Add child node |
| Enter | Add sibling node (adds a child on the root node); Shift+Enter inserts before |
| Double-click / Space / F2 | Edit; the text is selected so typing replaces it (set "When editing a node" in settings to put the cursor at the end instead); Enter to commit, Esc to cancel |
| Delete / Backspace | Delete the selected nodes and their subtrees |
| ⌘⌫ | Delete only the selected node; its children move up into its place |
| ⌘↵ | Insert a parent node: selected siblings go into one new node, non-siblings each get their own (in the mind map view; use the context menu in code-block maps) |
| ⌘F | Search nodes; Enter / Shift+Enter to jump |
| ⌘C / ⌘X / ⌘V | Copy / cut / paste subtree |
| Shift+Enter (while editing) | Line break inside a node |
| ⌘K | Link to a note / create a new note |
| ⌘⇧B | Add a boundary around the selected nodes, or remove it |
| Alt+↑↓ / Alt+←→ | Reorder among siblings / promote or demote |
| Shift+click / ⌘+click / Shift+drag / ⌘A | Add to selection / toggle / box-select / select all |
| Drag node | Change parent or reorder |
| / | Fold or unfold the selected node |
| 1–9 / 0 | Show only N levels below the selected node / expand its whole branch; other branches stay as they are. With the central topic (or nothing) selected it applies to the whole map and fits the view |
| ⇧0 | Collapse the whole branch (the pair of 0); with the central topic (or nothing) selected, only the main topics stay visible |
| = / - | Expand / collapse the branch by one level |
| ⌘⇧0 | Zoom to the selected branch |
| Arrow keys | Move between nodes (up and down go through siblings first, then to the same level in the neighboring branch; the view follows when the selection leaves the screen; turn on Center the selected node to always glide the selection to the middle) | | ⌘Z / ⌘⇧Z | Undo / redo | | Scroll wheel / drag empty space | Pan; Shift + wheel pans sideways (set the wheel to zoom in settings → Mouse wheel; Shift + wheel then pans) | | ⌘+scroll wheel / pinch / ⌘= ⌘- | Zoom; ⌘0 to fit the canvas |
These keys are handled by the map itself. Adding a child or sibling, inserting before, inserting a parent, editing, deleting, deleting only the node, moving up or down, promoting, demoting, expanding or collapsing all sub-branches and expanding or collapsing one level, as well as folding, showing down to a level, zooming to a branch, boundaries, summaries and callouts, are also commands, so you can bind your own keys in Settings → Hotkeys (search for "gogoga Mind Map"), for example to match XMind. The built-in keys keep working; a key you bind to one of these commands takes priority, even Tab or Enter.
The node context menu has these too, so you don't need to remember the keys: Insert ▸ holds insert sibling before and insert parent, "Expand all sub-branches" and "Collapse all sub-branches" sit as a pair on the first level, Fold & view ▸ holds expand one level, collapse one level and show next level only, and "Delete this node only" is on the first level.
pnpm install
pnpm test # unit tests for Markdown round-tripping and layout
pnpm typecheck
pnpm lint # the same ESLint rules the Obsidian community directory runs
pnpm build # outputs dist/main.js
pnpm install-vault # copies the build into the vault set by OBSIDIAN_VAULT=...
pnpm gen-bench 3000 # writes a large mind map note into the vault's inbox for stress testing
With 3,000 nodes (measured in Obsidian desktop, after optimization): opening takes 195 ms, a single render 11 ms, each relayout while typing 7 ms, panning 0.2 ms per frame, folding to level 2 55 ms, and exporting PNG 785 ms. With 1,000 nodes the figures are 53 ms / 2 ms / 1.6 ms / 0.2 ms / 10 ms.
Rendering reuses DOM elements by node ID and only rebuilds elements whose content changed; connectors reuse their path and only update d; while typing, only the node being edited is re-measured.
| File | Responsibility |
|---|---|
src/markdown.ts |
Markdown ⇄ tree, lossless round-trip |
src/model.ts |
Tree model and add/delete/move operations |
src/layout.ts |
Layout engine (logic chart / left-and-right) and connector geometry |
src/canvas.ts |
Rendering, pan and zoom, selection, inline editing, keyboard |
src/view.ts |
Obsidian TextFileView: reads and writes the file, and holds the undo stack |
src/main.ts |
View registration and redirection, commands, code blocks (including write-back), menus |
src/codeblock.ts |
Locates and replaces the mindmap code block in the host note |
src/export.ts |
SVG / PNG export with embedded fonts |
src/xmind.ts |
.xmind reading (built-in zip and XML parsing) → Markdown |
src/xmind-view.ts |
Read-only .xmind view and conversion |
src/outline.ts |
Outline panel |
src/note-picker.ts |
Picker modal for linking notes |
src/theme.ts |
Theme registry: connector shape, branch colors, underline levels, spacing |
src/icon.ts |
The plugin's own mind map icon (Phosphor tree-structure) |
src/icon-picker.ts |
Icon picker in settings, searchable, supports emoji |
src/icon-value.ts |
Pure logic for icon values (prefixes, emoji detection) |
src/property-icon.ts |
Preview for the icon row in the Properties panel; click it to pick an icon |
styles.css |
Theme variables and each theme's [data-theme] color block, following Obsidian's light/dark mode |
What changed in each version is in CHANGELOG.md (中文). Before releasing, add the new version to both files: the release notes are taken from them, and the tests fail when the current version has no entry.
Pushing a tag publishes a release: git tag 0.3.1 && git push --tags (the tag must match version in manifest.json exactly, without a v). GitHub Actions builds the plugin and attaches main.js, manifest.json, and styles.css to the release.
BRAT users can install it by entering the repository URL. To install manually, put these three files in
<vault>/.obsidian/plugins/gogoga-mindmap/. Node isn't needed at runtime.
gogoga is free and open source. If this plugin helps you, you can support its development on afdian (爱发电). Obsidian also shows a support button for it in the community directory. Bug reports and ideas help just as much.
MIT, see LICENSE.