Render the note's Markdown source into a scaled div inside the pane for both edit and reading modes, removing the hidden helper leaves and the srcdoc iframe. Fixes the data-loss window in the helper force-render, workspace pollution from hidden sidebar tabs, the stale active-view read on leaf change, destroy/resize races, the leaked refresh button on unload, and wrong-file renders for background notes. Adds toggle and refresh commands, background-pane sync on vault modify, a trailing scroll re-sync for CodeMirror height settling, and scoped reading-view selectors so the minimap never binds itself as the scroll source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| scripts | ||
| src | ||
| .gitignore | ||
| esbuild.config.mjs | ||
| LICENSE | ||
| main.js | ||
| manifest.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| screenshot.png | ||
| styles.css | ||
| tsconfig.json | ||
| versions.json | ||
🗺️ Markdown Minimap — A Minimap View for Markdown Notes
Markdown Minimap adds a minimap panel inside your Obsidian editor pane, giving you a scaled-down visual overview of the entire note. Inspired by modern code editors, this plugin helps you navigate long Markdown files faster and with more spatial awareness.
Why this plugin?
Existing Obsidian minimap plugins lose functionality on long files — past a certain document length, the minimap stops being a usable scrollbar. Markdown Minimap is built specifically to handle long Markdown files correctly, with smooth scroll-with-document behavior similar to VS Code.
✨ Features
- 🔎 Live minimap view of the current note - supports all view modes
- 🖱️ Draggable viewport slider to scroll instantly
- 🌓 Supports all themes
- 💠 Automatically updates on scroll and content change
- 🔁 Per-note toggle and refresh buttons in the note header, plus command-palette commands (hotkey-assignable)
- 📏 Resizes automatically with the pane
📸 Screenshot
🚀 Getting Started
📦 Installation
You can install Markdown Minimap in three ways:
1. From the Community Plugins Browser (Recommended!)
- Open Obsidian
- Go to
Settings→Community Plugins - Disable Restricted Mode
- Click
Browseand search forMarkdown Minimap - Click
Installand thenEnable
2. Manual Installation
- Download the latest release from GitHub Releases
- Extract into your Obsidian
.obsidian/plugins/markdown-minimapfolder - Make sure the folder includes:
main.jsmanifest.jsonstyles.css(optional)
3. Clone Directly (For Developers)
git clone https://github.com/Nymbo/Markdown-Minimap .obsidian/plugins/markdown-minimap
🧪 Usage
- Install & enable the plugin.
- Open any markdown note.
- A minimap will appear on the right edge of the editor.
- Scroll & write in the editor — the minimap updates live.
- Drag the slider in the minimap to jump to different parts of the note.
- Click the
Toggle Minimapbutton in the upper-right corner of the pane to choose whether to show minimap.
⚙️ Settings
- Adjustable minimap scale
- Enable minimap by default
- Opacity (separate for minimap and slider)
- Top and bottom offsets (for custom toolbars, status bars, or bottom chrome)
- Scrollbar gap
- Minimum viewport highlight height
- Center-on-click behavior
📌 Implementation Notes
Full-document rendering: Obsidian's editor virtualizes long notes, which causes naive DOM-cloning minimap implementations to capture only the visible portion. Markdown Minimap instead renders the note's full Markdown source with Obsidian's own renderer into a scaled-down panel inside the pane, so the minimap always reflects the entire document regardless of length — with no hidden helper views and no iframes.
Development
Markdown Minimap is built from TypeScript source in src/main.ts.
npm install
npm run build
Use npm run dev to watch and rebuild main.js during local development.
💡 Ideas and Contributions
Contributions, bug reports, and feature requests are welcome! Feel free to open an issue or submit a pull request.
Credits
Markdown Minimap is initially based on YairSegel/ObsidianMinimap, distributed under the MIT License.
