Lucas Ostmann3k downloadsAutomatically set the view mode (Reading, Live Preview, Source) for notes using folder rules, file patterns, or frontmatter
Automatically control view modes (Reading, Live Preview, Source) for your notes based on smart rules and patterns.
Automatically applies the right view mode when opening notes based on your rules:
Configure view modes based on:
Templates/ open in Source modesent open in Reading mode)
Right-click any file or folder in the File Explorer or Notebook Navigator to instantly lock it to a specific view mode.
See at a glance which files and folders are locked with inline icon badges:
Lock icons in File Explorer (left) and Notebook Navigator (right)
Full support for Notebook Navigator plugin:
When you open a note, Current View checks for view mode rules in this order:
1. File Pattern Rules → Exact path match or RegEx pattern
2. Tag Rules → Any matching tag in frontmatter
3. Folder Rules → Deepest matching folder wins
4. Frontmatter → Per-note override
5. Obsidian Default → Your global Obsidian setting
Example:
Templates/ → Source modeTemplates/meeting-note.mdcurrent view: readingExample with tag rule:
sent → Reading modetags: [sent] in its frontmatterAdd a frontmatter field to any note for per-note control:
---
current view: reading # Options: reading, source, live
---
You can customize the frontmatter key in plugin settings (e.g., change it to view-mode or display).
📚 Documentation vault:
# Lock all files in Docs/ to Reading mode
Folder: Docs/
Mode: reading
🗓️ Daily notes:
# Match pattern like "2024-01-15.md"
Pattern: ^\d{4}-\d{2}-\d{2}\.md$
Mode: live
⚙️ Templates:
# All templates open in Source mode for editing
Folder: Templates/
Mode: source
📬 Published/sent notes:
# Notes tagged with 'sent' or 'published' open in Reading mode
Tag: sent
Mode: reading
Any note with tags: [sent] in its frontmatter will automatically open in Reading mode.
| Setting | Description | Default |
|---|---|---|
| Frontmatter key | Which frontmatter field to read for view mode | current view |
| Debounce timeout | Delay (ms) before applying view mode to prevent rapid switching | 0 |
| Setting | Description | Default |
|---|---|---|
| Ignore opened files | Don't change view mode for notes already open in workspace | false |
| Ignore force view when not in frontmatter | Only apply rules if frontmatter explicitly sets a view mode | false |
| Setting | Description | Default |
|---|---|---|
| Show explorer icons | Display lock icons next to files/folders in File Explorer and Notebook Navigator | true |
| Show lock notifications | Show notice when locking/unlocking via context menu | true |
Use BRAT only if you want to test beta builds before they are released in the Obsidian Community Plugins directory.
LucEast/obsidian-current-view1.5.3-beta.1)1.5.3 and are distributed through the Obsidian Community Plugins directory.1.5.3-beta.1 and are distributed through GitHub Releases for BRAT testers.1.5.3-beta.1 via BRAT, Obsidian may not automatically switch you to the stable 1.5.3 release later.If you want to leave the beta channel and go back to the normal Community Plugins release track:
main.js, manifest.json, and styles.css from Releases<vault>/.obsidian/plugins/obsidian-current-view/git clone https://github.com/LucEast/obsidian-current-view.git
cd obsidian-current-view
npm install
npm run dev # Watch mode - auto-rebuild on changes
npm run build # Production build
npm run test # Run unit tests once
npm run test:watch # Watch mode during development
npm run coverage # Generate V8 coverage report
See CLAUDE.md for development guidelines and architecture overview.
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'feat: add amazing feature')git push origin feature/amazing-feature)If you encounter issues or have feature requests:
MIT – Free to use and modify.