Read Only View
approvedby mrkazzila
This plugin has not been manually reviewed by Obsidian staff. Keep selected Markdown notes in Reading view using include and exclude path rules.
Read Only View
Keep selected Markdown notes in Obsidian Reading view by matching their vault paths against simple include and exclude rules.
- Community Plugin: available through Obsidian Community Plugins
- Platforms: Desktop and Mobile
- Requires: Obsidian
1.10.3+ - License:
0BSD - Support: GitHub Issues
Privacy: no network requests, all rule matching stays local.
What it does
Read Only View forces matched .md notes to stay in Reading view.
- Use include rules to choose which notes should stay read-only.
- Use exclude rules to carve out exceptions.
- Match one folder, one file, or a broader pattern set.
- Use built-in diagnostics and the Path tester when a rule does not behave as expected.
This plugin changes Obsidian view behavior only. It does not change file-system permissions.
Quick start
By default:
Use glob patternsis off, so rules are matched as plain path prefixes.Case sensitiveis on.Excluderules override matching include rules.
First working setup in default mode:
- Open Settings → Community plugins → Browse.
- Search for
Read Only View, then Install and Enable it. - Open Settings → Read Only View.
- Make sure
Enabledis on. - In Include rules, add a folder rule such as:
projects/
- Open a note inside that folder, for example
projects/plan.md. - The note should stay in Reading view.
If it does not apply:
- confirm the note path starts with
projects/ - check whether
Case sensitivematches the actual path casing - check whether an
Excluderule also matches - run Re-apply rules now from the Command Palette
- use the Path tester with the exact note path

A note that matches the configured rules is kept in Reading view.
Installation
Community Plugins
Recommended for normal use.
- Open Settings → Community plugins.
- Click Browse.
- Search for
Read Only View. - Click Install.
- Click Enable.
BRAT (beta or dev testing)
Use this only to test unreleased changes instead of the Community Plugins release.
- Install Obsidian42 - BRAT from Settings → Community plugins → Browse.
- Open the Command Palette and run BRAT: Add a beta plugin for testing.
- Paste:
https://github.com/mrKazzila/Read-Only-View
- Add the plugin, refresh the plugin list if needed, then enable Read Only View.
Manual installation
Use this only as a fallback for local development or manual testing.
- Download or build the plugin files.
- Copy them into:
<Vault>/.obsidian/plugins/read-only-view/
- Required files:
main.jsmanifest.json
- Optional file:
styles.css
- Restart Obsidian or reload plugins, then enable Read Only View.
How matching works
- Only Markdown files (
.md) are affected. - A note becomes read-only only if at least one include rule matches it.
- If an include rule and an
Excluderule both match, theExcluderule wins. - With
Use glob patternsoff, rules are treated as plain path prefixes. - With
Use glob patternson, rules may use*,**, and?. - Matching is case-sensitive unless you turn
Case sensitiveoff.
Default mode examples:
projects/matches notes under that folder, such asprojects/spec.mdnotes/policies/security.mdmatches that exact file path
If a rule surprises you, test the exact path in Path tester before changing several rules at once.
Rule examples
One folder in default mode
Use glob patterns off:
Include:
projects/
Exclude:
One exact file path
Use glob patterns off:
Include:
notes/policies/security.md
Exclude:
Include a folder, exclude one subfolder
Use glob patterns off:
Include:
projects/
Exclude:
projects/drafts/
Glob mode example
Turn Use glob patterns on first:
Include:
project_a/**
**/README.md
Exclude:
project_a/archive/**
Commands
Available from the Command Palette:
Enable read-only modeDisable read-only modeToggle read-only modeRe-apply rules now
Enable read-only mode appears only when the plugin is currently disabled.
Disable read-only mode appears only when the plugin is currently enabled.
Diagnostics and path tester
In Settings → Read Only View, you can configure:
EnabledUse glob patternsCase sensitiveDebug loggingDebug: verbose pathsInclude rulesExclude rules
While editing rules:
- settings are saved automatically after a short delay
- status text shows
Saving...,Saved., orSave failed. - diagnostics show suspicious or non-effective lines inline
- very large rule sets may cause extra lines to be ignored
Use Path tester to paste the exact note path and confirm:
- which include rules matched
- which exclude rules matched
- whether the final result is
READ-ONLY ONorREAD-ONLY OFF

Inline diagnostics help explain why a rule is valid, suspicious, or ignored.
Troubleshooting
- A note is not switching to Reading view:
- confirm the plugin
Enabledtoggle is on - confirm the file is a
.mdnote - confirm at least one include rule matches
- confirm no
Excluderule matches the same path
- confirm the plugin
- A rule looks right but still does not match:
- copy the exact note path into Path tester
- check path casing if
Case sensitiveis on - check whether
Use glob patternsis off and wildcard characters are being treated literally
- A folder rule matches too broadly:
- in default mode, remember that matching uses plain path prefixes
- keep a trailing
/for folder rules
- Rule changes do not seem to apply yet:
- wait for
Saved. - run Re-apply rules now
- reopen the note if needed
- after very rapid view toggles, allow a brief moment for the plugin to retry after the layout burst settles
- wait for
- Diagnostics show ignored rules:
- reduce the number of rules
- merge similar paths where practical
- prefer broader glob rules only if you intentionally enabled glob mode
Limitations
- This is not an OS-level read-only lock.
- It only affects Obsidian view behavior for Markdown files.
- It does not protect non-Markdown files.
- It is not a security boundary against other apps, editors, or external tools.
Development
For local development:
npm install
npm run lint
npm test
npm run build
Repository guidance and contributor workflow live in CONTRIBUTING.md.
License
Licensed under 0BSD. See LICENSE.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.