No description
Find a file
Jochen Bernard 14181d1d6e
chore: prep repo for community.obsidian.md submission flow (#3)
* chore: prep repo for community.obsidian.md submission flow

Wires up eslint-plugin-obsidianmd (the same rule set the new
automated review pipeline uses) as `npm run lint` and a CI step, and
rewrites the submission section of docs/PUBLISHING.md to point at the
new developer dashboard instead of the deprecated
obsidianmd/obsidian-releases PR workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: resync package-lock with package.json

Regenerated to satisfy `npm ci` in CI — the prior lockfile was
inconsistent (missing @types/node 25.9.1, mismatched undici-types).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:55:52 +00:00
.github/workflows chore: prep repo for community.obsidian.md submission flow (#3) 2026-05-23 11:55:52 +00:00
docs chore: prep repo for community.obsidian.md submission flow (#3) 2026-05-23 11:55:52 +00:00
scripts feat: add install:plugin script to deploy build into a vault 2026-04-20 19:23:41 +02:00
src fix: drop unnecessary non-null assertions on data.rules 2026-04-24 16:04:22 +02:00
tests feat: add normalizePath helper for rule paths 2026-04-20 18:07:35 +02:00
.gitignore feat: add install:plugin script to deploy build into a vault 2026-04-20 19:23:41 +02:00
CLAUDE.md chore: prep repo for community.obsidian.md submission flow (#3) 2026-05-23 11:55:52 +00:00
CONTRIBUTING.md chore: prep repo for community.obsidian.md submission flow (#3) 2026-05-23 11:55:52 +00:00
esbuild.config.mjs chore: scaffold plugin repo with build + test tooling 2026-04-20 17:37:05 +02:00
eslint.config.mjs chore: prep repo for community.obsidian.md submission flow (#3) 2026-05-23 11:55:52 +00:00
LICENSE chore: scaffold plugin repo with build + test tooling 2026-04-20 17:37:05 +02:00
manifest.json chore: prepare v1.0.0 for Obsidian community plugin submission 2026-04-24 10:38:04 +02:00
package-lock.json chore: prep repo for community.obsidian.md submission flow (#3) 2026-05-23 11:55:52 +00:00
package.json chore: prep repo for community.obsidian.md submission flow (#3) 2026-05-23 11:55:52 +00:00
README.md docs: split contributor content out of README 2026-04-24 10:53:01 +02:00
tsconfig.json chore: scaffold plugin repo with build + test tooling 2026-04-20 17:37:05 +02:00
versions.json chore: prepare v1.0.0 for Obsidian community plugin submission 2026-04-24 10:38:04 +02:00
vitest.config.ts chore: scaffold plugin repo with build + test tooling 2026-04-20 17:37:05 +02:00

View Mode Rules

An Obsidian plugin that lets you set a default view (editing or reading) per note or folder, without using note frontmatter.

Features

  • Set a default view on any note or folder from the file-explorer right-click menu.
  • Folder rules apply to every note inside the folder; the most specific (deepest) folder wins.
  • A plugin-level global default is used as a fallback, with Obsidian's built-in behavior beneath that.
  • Rules survive renames and moves; rules for deleted notes are cleaned up automatically.
  • Optional: re-apply configured views when navigating into already-open tabs.
  • Optional: apply configured views to tabs restored at Obsidian startup.

Resolution order

When you open a note, the plugin decides which view to use in this order:

  1. A rule targeting that exact note.
  2. The deepest folder rule whose folder contains the note.
  3. The plugin's global default (Editing, Reading, or "Use Obsidian default").
  4. Obsidian's built-in default view for new tabs.

Install

From the Obsidian community plugins browser

Available once the plugin is accepted into the community directory. Submission is pending — use one of the other methods below in the meantime.

  1. Open Settings → Community plugins.
  2. Turn off Restricted mode if it is on.
  3. Click Browse, search for View Mode Rules, and install.
  4. Enable the plugin in Settings → Community plugins.

Manual

  1. Download manifest.json and main.js from the latest GitHub release.
  2. Copy both files into your vault's .obsidian/plugins/view-mode-rules/ folder (create the folder if it does not exist).
  3. Reload Obsidian and enable the plugin under Settings → Community plugins.

Commands

  • View Mode Rules: Set current note to default editing view
  • View Mode Rules: Set current note to default reading view
  • View Mode Rules: Clear default view for current note
  • View Mode Rules: Open settings

Settings

  • Global default — fallback view when no rule matches.
  • Apply on workspace restore — apply rules to restored tabs at startup (off by default).
  • Apply on navigation — re-apply rules when navigating into an already-open tab (on by default).

Rules are listed in two tables (note rules and folder rules). You can edit a rule's mode inline, remove it, or add new rules by path.

Scope

Only Markdown notes are affected. Non-Markdown file types (PDFs, canvases, images, etc.) are ignored by rule resolution and by the file-menu action.

Contributing

See CONTRIBUTING.md for build, test, and release instructions.

License

MIT