mrkazzila1k downloadsKeep selected Markdown notes in Reading view using include and exclude path rules.
Keep Markdown notes in Obsidian Reading view, either across the whole vault or only at selected paths.
1.10.3+0BSDPrivacy: Read Only View makes no network requests, and all rule matching stays local. When you import an absolute system path, the plugin stores only its portable path inside the vault, not the full local path.
Documentation: https://mrkazzila.github.io/Read-Only-View/
Read Only View keeps matching .md notes in Reading view to help prevent accidental edits.
All Markdown files mode.Only matched paths mode.This plugin changes Obsidian view behavior only. It does not change file-system permissions and is not an operating-system security boundary.
Read-only protection uses two layers:
This additional editor layer is intended to cover contexts such as Page Preview and Hover Preview more directly, though some edge cases still depend on Obsidian's internal view behavior.
On a new installation:
Enabled is on.Mode is set to All Markdown files.Use glob patterns is off, so ordinary rules use plain path-prefix matching.Case sensitive is on.Debug logging and Debug: verbose paths are off.To protect every Markdown note:
Read Only View, then Install and Enable it.Enabled on and leave Mode set to All Markdown files.To protect selected paths instead:
Mode to Only matched paths.Include and enter a folder such as:projects/
projects/plan.md.If the rule does not apply, paste the exact note path into Path tester and check whether an exclude rule also matches.

All Markdown files mode protects every Markdown note unless an exclude rule matches.
The welcome window is shown only after a new installation. Plugin updates, re-enabling, and Obsidian restarts do not show it again. It provides a shortcut to the settings page.
Recommended for normal use.
Read Only View.Use BRAT to test unreleased builds instead of the Community Plugins release.
https://github.com/mrKazzila/Read-Only-View
Use this as a fallback for local development or manual testing.
<Vault>/.obsidian/plugins/read-only-view/
main.js and manifest.json. Include styles.css when it is provided.Only Markdown files (.md) are affected.
The plugin evaluates a note in this order:
All Markdown files mode protects the note.In short: Exclude rules → All Markdown files → Include rules.
Every Markdown note stays in Reading view unless an enabled exclude rule matches it.
Saved include rules are retained but inactive in this mode. Their individual enabled states are preserved, so you can switch back to Only matched paths without rebuilding the rule list.
A Markdown note stays in Reading view only when an enabled include rule matches and no enabled exclude rule matches.
Changing or deleting rules does not change the selected mode. An empty rule list is valid; in Only matched paths mode, it means that no notes are protected.

Only matched paths mode uses enabled include rules to decide which notes stay in Reading view.
With Use glob patterns off, rules are matched as plain path prefixes:
projects/ matches notes inside that folder, such as projects/spec.md.notes/policies/security.md matches that note path.Keep a trailing / when you intend to match a folder. Matching is case-sensitive unless you turn Case sensitive off.
With Use glob patterns on, rules may use *, **, and ?.
The Value field accepts three source formats:
Inbox/Quick capture.md
obsidian://open?vault=demo-vault&file=Inbox%2FQuick%20capture
/Users/name/vaults/demo-vault/Inbox/Quick capture.md
/Users/name/vaults/demo-vault/Knowledge Base/Productivity/
.md resolves to that Markdown note when it already exists. An existing folder copied without a trailing / is normalized to a folder rule automatically. Add / explicitly when a note and folder share the same name and you intend to target the folder.obsidian://open URL targets one existing Markdown note. It must reference the current vault. The .md extension may be omitted, and heading or block locators do not change which note is matched.An imported file becomes an exact rule. An imported folder keeps ordinary folder matching behavior. Once a system path is imported, the saved vault-relative path remains portable to mobile devices and does not expose the original absolute path.
If a URL or system path cannot be resolved, the value stays visible so you can correct it, but it does not participate in matching or the active-rule count.
Set Mode to Only matched paths and keep Use glob patterns off:
Type: Include
Value: projects/
Set Mode to Only matched paths and keep Use glob patterns off:
Type: Include
Value: notes/policies/security.md
You can also paste an Obsidian URL for an existing note to create an exact-file rule.
Set Mode to Only matched paths and add:
Type: Include
Value: projects/
Type: Exclude
Value: projects/drafts/
Notes under projects/drafts/ remain editable because exclude rules always win.
Set Mode to All Markdown files and add:
Type: Exclude
Value: workspace/
All other Markdown notes remain protected, while notes under workspace/ stay editable.
Turn Use glob patterns on first:
Type: Include
Value: project_a/**
Type: Include
Value: **/README.md
Type: Exclude
Value: project_a/archive/**
The settings screen is organized around the main workflow:
All Markdown files mode is enabled.Enabled toggle and both mode choices.Matching and Debug flags sections.Each section title is contained in its single section card; the settings UI does not add a second heading or outer frame around these cards. Top-level cards stay aligned with compact spacing, with extra separation before Path rules to distinguish configuration from rule management.
Each row contains:
Enabled checkboxInclude or Exclude type selectorDisable a row when you want to keep it without applying it. Disabled rules do not participate in matching, diagnostics, or active-rule counts. In All Markdown files mode, include rows are shown as inactive while exclude rows continue to work.
Resolved vault note and folder paths, Obsidian URLs, and system paths show the corresponding normalized vault path below the Value field. Invalid values show an inline explanation. The rules summary and diagnostics reflect the rows that can actually participate in matching.

The unified rule editor resolves advanced sources to portable paths inside the vault.
Paste a vault path, Obsidian URL, or system path into Path tester. It shows:
Read-only or Editable statusFor a system folder, the tester shows the resolved folder and asks for a specific Markdown note before evaluating rule matches.

A resolved Obsidian URL matches an include rule and is reported as read-only.
On narrow phone and tablet settings panes, the interface switches to a stacked layout so rule controls, descriptions, resolved paths, and errors remain readable. Rules created from a system path on desktop continue to work from their saved vault-relative paths on mobile.
Changing a rule between Include and Exclude updates the existing row in place, so the mobile system picker closes normally after a selection.
The Matching and Debug flags sections are collapsed by default and expand inline. Their summaries show the current state, and their individual controls remain discoverable through settings search. Open Matching to switch between prefix and glob matching or to change case sensitivity. Debug options are intended only for diagnosing rule behavior.

Advanced keeps matching and diagnostic controls out of the primary workflow until they are needed.
Available from the Command Palette:
Enable read-only modeDisable read-only modeToggle read-only modeRe-apply rules nowEnable read-only mode appears only when the plugin is disabled. Disable read-only mode appears only when it is enabled.
Use Re-apply rules now when you want to enforce the current configuration immediately across open Markdown notes.
Enabled is onOnly matched paths mode, confirm that an enabled include rule matchesAll Markdown files mode:All Markdown files mode is selectedEnabled checkbox is selectedCase sensitive is onUse glob patterns is off/ when the rule is intended for a folderobsidian://open URLSaved.Re-apply rules nowFor local development:
npm install
npm run lint
npm test
npm run build
Equivalent just recipes are available. Use just link-plugin to link a local build into the repo's demo vault by default, and just unlink-plugin to remove that local install.
Repository guidance and contributor workflow live in CONTRIBUTING.md.
Licensed under 0BSD. See LICENSE.