blursedperf30 downloadsSearch markdown files while preserving hierarchical context: displays the matched line, its immediate parent, and all nested children based on indentation.
A fast, lightweight Obsidian search plugin that extracts and renders hierarchical Markdown list blocks—displaying the matched line, its parent(s), and all nested children based on outline indentation.
I created this suite of Obsidian plugins and the DoomEsque theme so that I can be 100 percent certain there are no network calls or traffic: everything runs 100 percent offline, so I can use Obsidian for my notes in open-book law exams.
scripts/offline-audit.mjs, which fails on any network API (fetch, XMLHttpRequest, WebSocket, requestUrl, ...).The suite:
When searching through outlines, nested task lists, or meeting notes in Obsidian, standard search displays only the isolated matching line. You lose:
Whole-Tree Search searches your vault and reconstructs the full hierarchical tree block:
- Project Alpha <-- [Immediate Parent]
- Milestone 1: Database Schema <-- [MATCHED LINE]
- Users table <-- [Nested Child 1]
- Sessions table <-- [Nested Child 2]
cachedRead API and query cancellation to ensure smooth, responsive search even across large vaults.↑ / ↓: Navigate suggestions.↵ (Enter): Jump directly to the matched line in the note.mod + ↵ (Cmd + Enter / Ctrl + Enter): Open note in a new tab/pane at the matched line.esc: Dismiss search modal.Whole-Tree Search is built with strict privacy and security principles:
scripts/offline-audit.mjs, which fails on any network API (fetch, XMLHttpRequest, WebSocket, requestUrl, workers, dynamic import(), ...), dynamic code (eval, new Function), raw HTML injection, or remote CSS (@import, non-data: url()).), raw HTML that loads resources (<img>, <iframe>, <video>, ...) and embeds of other notes are neutralised, so searching never makes a network request. Embeds of local images, audio, video and PDFs still show.app.vault API and does not touch files outside your vault.MarkdownRenderer.render APIs. No raw HTML strings or eval statements are used.Component lifecycle management, properly loading and unloading DOM listeners between keystrokes and modal sessions.Whole-Tree Search.main.js, manifest.json, and styles.css from the latest GitHub Release.whole-tree-search in your vault's plugin directory: <vault>/.obsidian/plugins/whole-tree-search/.Ctrl + P or Cmd + P).Enter to navigate to the matched line in the note, or Cmd/Ctrl + Enter to open in a new tab.(Tip: Assign a custom hotkey to Open whole-tree search in Settings > Hotkeys for quick access).
Open Settings > Community plugins > Whole-Tree Search to configure the options below. On Obsidian 1.13+ every setting is also discoverable through the settings search.
| Setting | Default | Description |
|---|---|---|
| Maximum results | 50 | Stop searching once this many matches are found. |
| Minimum query length | 1 | Characters to type before searching starts. |
| Case sensitive | Off | Match the exact capitalization of the query. |
| Ignore frontmatter | Off | Skip matches inside YAML frontmatter. |
| Excluded folders | — | Folders (one per line) whose notes are never searched, including subfolders. |
| Ancestor levels | 1 | Parent levels shown above the match (0 = none, 1 = immediate parent, higher = full path). |
| Show nested children | On | Include items nested beneath the match. |
| Maximum child depth | 0 | Levels of children to show (0 = all). |
| Blank lines end a block | On | Treat empty lines as the end of an outline; turn off for lists with blank lines between items. |
| Tab width | 4 | Spaces a tab counts as when comparing mixed tab/space indentation. |
| Open in new tab by default | Off | Swap Enter and Mod + Enter so results open in a new tab by default. |
# Install dependencies
npm install
# Run unit tests
npm test
# Build for development
npm run dev
# Build for production
npm run build
MIT © blursedperf