Advanced Exclude

approvedunreviewed

by Michael Naumov

Enhances the Excluded files setting bringing gitignore syntax.

★ 73 stars↓ 21,214 downloadsUpdated 2d agoMIT

Advanced Exclude

Buy Me a Coffee GitHub release Obsidian downloads Minimum Obsidian version Coverage: 100%

Obsidian's Files and links > Excluded files setting does less than its name suggests: excluded files still sit in the Files pane, still turn up in Backlinks, still appear in search. They are de-emphasized, not excluded.

This plugin makes them behave as though they are not there, and lets you say which ones with gitignore syntax — the pattern language you already know — kept in two places: global patterns in the plugin settings, which Obsidian Sync carries to every device, and local patterns in a .obsidianignore file for this device only. Your existing .gitignore and Obsidian's own setting can feed it too.

[!WARNING]

The plugin makes Obsidian behave like the ignored files do not exist. This might affect features like Obsidian Sync, Obsidian Publish, etc.

Ensure you configured the plugin correctly to avoid data loss.

Excluded files still sit in your file explorer

More screenshots
One gitignore line later, they are not there at all Excluded files still sit in your file explorer One gitignore line later, they are not there at all

Demo vault

The documentation is a demo vault. Every feature has a note that explains what it does and why you would want it, with folders already in place to hide and un-hide.

Start reading here — it is plain markdown, so it works on GitHub with nothing installed.

A copy of the vault ships with every release. You can access it via any of the following:

  1. Running the Advanced Exclude: Open demo vault command.
  2. Downloading advanced-exclude-demo-vault.zip from the Releases. It unzips into a single advanced-exclude-demo-vault-<version> folder.
  3. Browsing its source in demo-vault/ in this repository.

What it does

  • Exclude with gitignore syntax — a folder, an extension, a path, in two settings text areas: global patterns that sync with your vault, and local patterns kept in .obsidianignore for one device. A line starting with # is a comment, as in .gitignore; write \# for a pattern that really starts with #. 01 Exclude a folder

  • Exclude from the Files pane menu — right-click a file, a folder or a selection and choose Exclude, or Exclude everything else in this folder to keep only those items. The line is written for you, escaped and anchored at the vault root, to the global patterns or, by a setting, to .obsidianignore, and applied at once. 06 Exclude from the Files pane menu

  • Whitelist instead of blacklist, including the negation trap that catches most people: once * ignores everything, folders must be re-included with !*/ before any !file rule can reach inside them. 02 Whitelist with negation

  • Catch pattern mistakes as you type — every pattern box lists, under it, the lines that match nothing (an unclosed [, a lone \ at the end, a ./ path) in red, and the lines that probably mean something else (a \ between folders, a trailing space, a regular expression copied from Obsidian's Excluded files) in amber. Nothing is blocked: every line is still saved and applied. When .obsidianignore is edited outside Obsidian and gains an error, a notice names the line when you come back.

  • Choose where patterns come from and how hard they hide — your .gitignore, Obsidian's own Excluded files setting, and how completely an ignored file disappears: Full removes it from Obsidian's index, so even a 30,000-file folder is never indexed; Files pane hides it from the Files pane only; Soft leaves it out of search, the quick switcher, link suggestions, graph, unlinked mentions and Bases, exactly where Obsidian's own Excluded files applies, while it stays in the Files pane and in links. The extra sources are off by default, so a fresh install changes nothing until you turn one on. 03 Exclude mode and sources

  • Pick the features the Soft mode reaches — search, graph, unlinked mentions and the rest each have a toggle, so a folder can be left out of unlinked mentions only while search and graph still find it. 03 Exclude mode and sources

  • Soft-exclude some files while hiding others — the Soft patterns setting soft-excludes its matches in every exclude mode, so Full mode can hide one set of files entirely while another set (scripts full of search keywords, say) stays in the Files pane and only leaves search and the rest. 03 Exclude mode and sources

  • Exclude notes by property, in the Soft mode — visibility: gm-only keeps a game master's notes out of search and graph without moving them. 03 Exclude mode and sources

  • Hide folders left empty by exclusion, cascading up through parents whose whole subtree went away. Genuinely empty folders stay visible. 04 Settings

  • Switch between profiles — named sets of patterns and settings that compose with @import, so Focus can import Work and add its own lines, with !negation working across them as in one .gitignore. @import file:<path> pastes a file's patterns the same way, so @import file:.gitignore places the vault's .gitignore anywhere in a profile, and on desktop an absolute path such as @import file:C:/Users/me/AllVaultsIgnore shares one ignore file between several vaults. The profiles sync with the vault; each device picks its own active one from the status bar. 05 Profiles

See also

My other Obsidian resources

PluginFeaturesHow Advanced Exclude differs
DiscreteFiles pane filtering by frontmatter; comparison operators; AND/OR; show-only modeCovers part of the same goal: property rules in the Soft mode only, by value; adds pattern-based index exclusion
Explorer HiderExplorer and bookmark hiding through CSS; context-menu selectionBroader exclusion: index filtering rather than CSS alone
File Explorer++Explorer hiding and pinning; wildcard and regex filtersBroader exclusion: can remove files from the index; no pinning
File HiderExplorer context-menu hiding; visibility toggle commandBroader exclusion: pattern-based index filtering
File IgnoreLeading-dot renames; exclusion travels with the fileSame exclusion goal; keeps file names unchanged
Graph ExclusionsGraph-only exclusion rules by path, file name or tag; a toggle per ruleBroader exclusion: graph among other features; no tag rules or per-rule toggles
Hide Excluded Files MORERemoves native Excluded files from the quick switcher and link suggestionsSame goal in the Full mode; the Soft mode only ranks them lower there, as Obsidian does
Hide FoldersExplorer visibility toggle by folder nameBroader exclusion: patterns across paths; index exclusion as well
Hide Folders and FilesExplorer hiding by exact name, prefix or suffix; ribbon toggle; optional native Excluded files entriesBroader exclusion: gitignore patterns; index exclusion; no ribbon toggle
Ignore.obsidianignore; native Excluded files listSame exclusion goal; removes files from the index too; synced patterns, profiles, validation
Ignore Filters BoostExplorer actions editing native Excluded files; exclude-all-except-oneBroader exclusion: pattern rules rather than editing the native list
Shadow TreeExplorer-only filtering; folder pins; optional Sync exclusionBroader exclusion: can remove files from the index; no folder pinning
SieveScan-time exclusion; Syncthing-style first-match rules; vault display nameSame exclusion goal; uses gitignore syntax; no vault renaming
Toggle Excluded FoldersOne-click toggle of native Excluded filesBroader exclusion: maintained patterns and profiles; index filtering

Last searched for similar plugins on 2026-11-23.

Installation

The plugin is available in the official Community Plugins repository.

Beta versions

To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:

  1. Ensure you have the BRAT plugin installed and enabled.
  2. Click Install via BRAT.
  3. An Obsidian pop-up window should appear. In the window, click the Add plugin button once and wait a few seconds for the plugin to install.

Debugging

By default, debug messages for this plugin (id: advanced-exclude) are hidden.

If you need to enable them refer to the documentation.

Changelog

All notable changes to this project will be documented in the CHANGELOG.

Contributing

Contributions are welcome — see CONTRIBUTING to get set up.

Support

Buy Me A Coffee

Filing an issue (for AI agents and humans)

Open issues through the issue forms, not as blank issues.

To report a bug from inside Obsidian, run the Advanced Exclude: Report a bug command. It opens the bug form with the plugin version, the Obsidian version and your operating system already filled in.

Filing from the CLI or the API (gh issue create --body, or an AI agent filing for you) skips the form, and gh issue create --template cannot load an issue form. In that case, open the matching form in .github/ISSUE_TEMPLATE/, copy every field as a ### <label> heading in the form's order, and fill in each one. Always state the plugin version, the Obsidian version and your operating system.

License

© Michael Naumov

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.