mrkazzila678 downloadsKeep selected Markdown notes in Reading view using include and exclude path rules.
Keep selected Markdown notes in Obsidian Reading view by matching their vault paths against simple include and exclude rules.
1.10.3+0BSDPrivacy: no network requests, all rule matching stays local.
Read Only View forces matched .md notes to stay in Reading view.
This plugin changes Obsidian view behavior only. It does not change file-system permissions.
Read-only protection uses two layers:
This additional editor layer is intended to cover contexts such as Page Preview / Hover Preview more directly, though some edge cases still depend on Obsidian internal view behavior.
By default:
Use glob patterns is off, so rules are matched as plain path prefixes.Case sensitive is on.Exclude rules override matching include rules.First working setup in default mode:
Read Only View, then Install and Enable it.Enabled is on.projects/
projects/plan.md.If it does not apply:
projects/Case sensitive matches the actual path casingExclude rule also matches
A note that matches the configured rules is kept in Reading view.
Recommended for normal use.
Read Only View.Use this only to test unreleased changes instead of the Community Plugins release.
https://github.com/mrKazzila/Read-Only-View
Use this only as a fallback for local development or manual testing.
<Vault>/.obsidian/plugins/read-only-view/
main.jsmanifest.jsonstyles.cssjustUse this to install a clearly marked local dev build into the repo demo vault by default without changing the repo manifest.json.
just link-plugin
DEV_PLUGIN_VERSION=999.1.0 just link-plugin
just unlink-plugin
just link-plugin symlinks main.js and optional styles.css, then generates a vault-local manifest.json with a DEV label.just link-plugin and just unlink-plugin target ./demo-vault in the repository root.VAULT=/path/to/vault just link-plugin or VAULT=/path/to/vault just unlink-plugin to target a different vault.DEV_PLUGIN_VERSION=... just link-plugin overrides the default dev manifest version 999.0.0.just unlink-plugin removes only the local dev plugin install from the target vault after confirmation and leaves the vault notes intact.read-only-view, so they cannot coexist in the same vault../demo-vault does not exist yet, run just demo-vault or just demo-vault-no-plugin first.Use the synthetic demo vault when you need manual QA, screenshots, or short videos without opening real notes.
just demo-vault
just demo-vault-reset
just demo-vault-no-plugin
just demo-vault creates or refreshes ./demo-vault and links the current local plugin build by default.just demo-vault-reset recreates the vault from scratch.just demo-vault-no-plugin creates the same synthetic notes without linking plugin files.Include rules for Read Only/ and Archive/, plus an Exclude rule for Read Only/Drafts/.main.js is missing, the generator stops with a clear build-first message instead of creating a broken plugin install.See docs/DEMO_VAULT.md for setup details and recommended recording scenarios.
.md) are affected.Exclude rule both match, the Exclude rule wins.Use glob patterns off, rules are treated as plain path prefixes.Use glob patterns on, rules may use *, **, and ?.Case sensitive off.Default mode examples:
projects/ matches notes under that folder, such as projects/spec.mdnotes/policies/security.md matches that exact file pathIf a rule surprises you, test the exact path in Path tester before changing several rules at once.
Use glob patterns off:
Include:
projects/
Exclude:
Use glob patterns off:
Include:
notes/policies/security.md
Exclude:
Use glob patterns off:
Include:
projects/
Exclude:
projects/drafts/
Turn Use glob patterns on first:
Include:
project_a/**
**/README.md
Exclude:
project_a/archive/**
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 currently disabled.
Disable read-only mode appears only when the plugin is currently enabled.
In Settings → Read Only View, you can configure:
EnabledUse glob patternsCase sensitiveDebug loggingDebug: verbose pathsInclude rulesExclude rulesWhile editing rules:
Saving..., Saved., or Save failed.Use Path tester to paste the exact note path and confirm:
READ-ONLY ON or READ-ONLY OFF
Inline diagnostics help explain why a rule is valid, suspicious, or ignored.
Enabled toggle is on.md noteExclude rule matches the same pathCase sensitive is onUse glob patterns is off and wildcard characters are being treated literally/ for folder rulesSaved.For local development:
npm install
npm run lint
npm test
npm run build
For installing the plugin into a local test vault, use just link-plugin; remove it later with just unlink-plugin.
Repository guidance and contributor workflow live in CONTRIBUTING.md.
Licensed under 0BSD. See LICENSE.