Skip to content

About

Forces notes to open in read-only preview mode. Lock your files to prevent accidental edits with this simple editor lock tool.

Topics

Resources

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

309 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read Only View

Keep your Markdown notes in Obsidian Reading view and prevent accidental edits, across your whole vault or only where you choose.

Get started: configure Include and Exclude rules in settings to keep selected notes in Reading view. Install, then protect a folder.

Read Only View 1.1.3+ includes Lock/Unlock, Explain read-only status, and optional File Explorer protection indicators.

Obsidian Downloads

Desktop and mobile · Obsidian 1.10.3+ · 0BSD license

Privacy: No network requests; all rule matching stays local. Imported system paths are stored as portable vault-relative paths, without the original absolute path.

Full documentation · Reading view vs read-only protection · Report an issue

File Explorer context menu with Lock → Reading selected

Why Read Only View?

Keep reference notes, documentation, dashboards, and archives in Reading view without accidentally opening the editor.

Pending Reading view switches are canceled if you navigate to another note, disable protection, exclude the note, close its view, or unload the plugin before the switch is applied.

  • Keep a knowledge base ready for reading.
  • Protect archived project notes while keeping drafts editable.
  • Protect individual Markdown notes.
  • Use the same rules on desktop and mobile.

Installation

In Obsidian, open Settings → Community plugins → Browse, search for Read Only View, then select Install → Enable.

Install with BRAT

To try unreleased builds:

  1. Install Obsidian42 - BRAT from Community Plugins.
  2. Run BRAT: Add a beta plugin for testing from the Command Palette.
  3. Paste https://github.com/mrKazzila/Read-Only-View.
  4. Add the plugin, refresh the plugin list if needed, and enable Read Only View.
Install release files manually

Download main.js, manifest.json, and styles.css (when provided) from a release. Copy them into:

<Vault>/.obsidian/plugins/read-only-view/

Restart Obsidian or reload plugins, then enable Read Only View.

Quick start

Lock a note or folder from File Explorer

  1. Install and enable Read Only View.
  2. Open Settings → Read Only View, keep Enabled on, and select Only matched paths to protect selected notes and folders.
  3. In File Explorer, use Right click → Lock → Reading on a Markdown note or folder. Lock → Reading is one menu item.

The shortcut creates or enables an Include rule. Folder locks cover Markdown notes in subfolders too; enabled Excludes still win. Choose Unlock to disable the target’s Include rules. Another rule or All Markdown files may keep it protected.

See Lock and Unlock notes and folders for steps and editable exceptions.

Protect all Markdown notes

Open Settings → Read Only View, keep Enabled on, and select All Markdown files. This is the default on a new installation. Add an Exclude rule for any note or folder that should remain editable.

Read Only View settings with All Markdown files mode enabled

Protect one folder

  1. Select Only matched paths.
  2. Under Path rules, select Add rule and enter:
Type: Include
Value: Notes/Summaries/
  1. Wait for Saved., then open a note in that folder. It will stay in Reading view.

Unresolved or overlength rules do not apply or consume rule limits. Disabled rules keep their place and can be enabled later. Note protection, the Path tester, and Explorer indicators use the same valid, enabled rules.

Exclude rules take priority over Include rules. See the full matching guide for advanced settings.

Advanced → Show protection indicators optionally adds small locks beside protected Markdown notes and folders in the File Explorer. It is off by default, visual only, and uses the same effective protection rules, including exclusions and the global Enabled switch.

Common examples

Use Only matched paths for these examples. Folder examples use the default path-prefix matching.

Read-only folder

Type: Include
Value: Archive/

Editable subfolder inside a protected folder

Type: Include
Value: Notes/Summaries/

Type: Exclude
Value: Notes/Summaries/Drafts/

Single note

Add an Include rule and paste the note's Obsidian URL into Value. For an existing Reference/Handbook.md note in a vault named MyVault:

Type: Include
Value: obsidian://open?vault=MyVault&file=Reference%2FHandbook.md

Use your own note's URL to protect exactly that note. You can also right-click a Markdown note or folder in the file explorer and choose Lock → Reading. See Lock and Unlock for exceptions and how to undo a lock.

How rules work

  • Include selects paths to protect in Only matched paths mode.
  • Exclude leaves matching paths editable, even when an Include matches or All Markdown files is selected.
  • Rules apply only to Markdown notes. Keep a trailing / for folder rules.
  • Uncheck a rule's Enabled checkbox to keep it without applying it.

In All Markdown files, saved Include rules are retained but inactive. In Only matched paths, notes without a matching enabled Include remain editable.

Glob matching uses a bounded polynomial-time algorithm so repeated wildcards cannot trigger exponential backtracking. Existing pattern semantics and rule limits are unchanged.

For glob patterns, case sensitivity, imported paths, and edge cases, see Path rules.

Path Tester

Use Path tester in the plugin settings to see whether a note is protected and which rule caused the result. Paste a note path such as Notes/Summaries/Meeting.md; it shows the resolved path, matching rules, and final Read-only or Editable status.

Path tester resolving an Obsidian URL and reporting Read-only

You can also right-click a note or folder and choose Explain read-only status to open the Read only view dialog. For a folder, it summarizes protection across its Markdown notes. See the diagnostics guide for details.

Commands

Available from Obsidian's Command Palette:

  • Enable read-only mode
  • Disable read-only mode
  • Toggle read-only mode
  • Re-apply rules now

Enable appears while protection is off; Disable appears while it is on. Use Re-apply rules now to apply the current configuration immediately to open Markdown notes.

Troubleshooting

  • A note stays editable: confirm the plugin and Include rule are enabled, then check for an Exclude match in Path tester.
  • A note stays protected: check whether All Markdown files or another Include rule still covers it. Add an Exclude when it should remain editable.
  • Saving changes: settings apply immediately while saves run in order. If a save fails, protection returns to the last saved state with any later edits preserved. Failed rule drafts remain in the open Settings editor for retry. Wait for Saved. before closing Settings; closing cancels edits still waiting for the debounce timer, but lets saves already underway finish.
  • Changes have not taken effect: wait for Saved., run Re-apply rules now, and reopen the note if needed.
  • A path does not resolve or match: check its spelling and use the troubleshooting guide.

If the issue persists, report it with your Obsidian version, plugin version, platform, and a small example rule set. Avoid sharing private paths or note content.

Limitations

  • Protection helps prevent accidental edits; it does not change filesystem permissions or provide security/access control.
  • Only Markdown notes opened in Obsidian are affected. Other plugins, applications, and external tools can still change the files.
  • Some embedded and preview contexts depend on Obsidian's view behavior; protection is not guaranteed in every context.
  • Imported URLs and system paths must resolve to existing items in the current vault. Rules do not automatically follow later renames.
  • New system-path imports require desktop Obsidian. Once imported, saved vault-relative paths work on mobile.

Documentation

Contributing

See CONTRIBUTING.md for source builds, local development, desktop/mobile testing, and documentation maintenance. Project activity is available in the Star History dashboard and Download History dashboard.

License

Licensed under 0BSD.

About

Forces notes to open in read-only preview mode. Lock your files to prevent accidental edits with this simple editor lock tool.

Topics

Resources

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages