File Ignore

by Feng
5
4
3
2
1
Score: 45/100

Description

The File Ignore plugin allows users to control which files Obsidian indexes by applying dot prefixes, similar to a .gitignore mechanism. It helps improve performance by preventing large or unnecessary files from being indexed, reducing startup times significantly. Users can define matching rules to hide specific files, folders, or patterns and toggle visibility when needed.

Reviews

No reviews yet.

Stats

24
stars
3,621
downloads
3
forks
422
days
53
days
53
days
3
total PRs
0
open PRs
0
closed PRs
3
merged PRs
11
total issues
6
open issues
5
closed issues
0
commits

Latest Version

2 months ago

Changelog

Bugfix and security release.

  • prevent Show/Restore from renaming originally dot-prefixed files unless they were hidden by the plugin
  • apply the same protection to single-file restore and batch planning
  • update minimatch to 5.1.8 and esbuild to 0.27.4

Verification:

  • npm run build
  • npm audit --json (0 vulnerabilities)

README file from

Github

📁 File Ignore

An Obsidian plugin that controls file indexing by managing dot prefixes (hidden attributes) on files/folders, providing a .gitignore-like experience. obsidian-file-ignore.kkuk.dev

English | 简体中文

Motivation

  • I use Next.js to manage my blog, writing and publishing through Obsidian. However, /node_modules was a headache as Obsidian indexed everything, causing extremely slow startup.
  • Leveraging Obsidian's default behavior of not indexing "dot-prefixed hidden files", I developed this plugin to change indexing behavior by modifying file names.
  • Before using the plugin, opening the repository took about 10s; after using it, it opens almost instantly.

When your Obsidian vault contains numerous non-note files (like code repositories, attachments, caches):

  • 🐢 Slow Startup & Performance Bottlenecks: Obsidian tries to index all files (including node_modules, .git, large attachment folders), leading to long startup times, high RAM and CPU usage, and sluggish operations.
  • 🔍 Cluttered Workspace: Global search results get polluted by irrelevant content from node_modules, etc.; the graph view becomes crowded and hard to read due to numerous non-note files.
  • ⚙️ Limited Built-in Exclusion: Obsidian's built-in "Exclude files" option often fails to truly prevent performance hits from indexing and isn't convenient to configure.

Settings Page

🚀 Features

  • File Filtering: Specify files or folders to ignore based on rules.
  • Hide Files: Add a dot (.) prefix to matched files/folders, making them invisible to Obsidian.
  • Show Files: Remove the previously added dot prefix, restoring visibility.
  • .gitignore-Style Patterns: Use familiar patterns for configuration.
  • Index Control: Prevent Obsidian from indexing and processing irrelevant content.

⚙️ Usage

Matching Rules

Supports the following matching patterns:

  • Specific file: test.md
  • Root directory file: /readme.md
  • Entire folder: temp/
  • Wildcard matching: *test/ (e.g., /_build/, /cache*/)

Operations

After configuring rules in the plugin settings page, you can:

  • Click "Hide Files": Builds a rename plan, shows a preview, and then adds a "." prefix to matching files/folders.
  • Click "Show Files": Builds a rename plan, shows a preview, and then removes the "." prefix from matching files/folders.
  • If a batch is interrupted, use the Recovery action in settings to undo the already-completed part safely.

How to Configure?

Configure your ignore rules in Obsidian's Settings -> Community plugins -> File Ignore settings page.

🛠️ Installation

  1. Open Settings > Community plugins in Obsidian.
  2. Ensure Safe mode is off.
  3. Click Browse community plugins.
  4. Search for "File Ignore".
  5. Click Install.
  6. Once installed, click Enable.

🔍 Tips

Recommended to use with the Show-Hide-Files plugin for better management (viewing or manipulating) of files hidden by this plugin.

🔒 Safety Notes

  • Important: File Ignore works by renaming files and folders on disk. It is not a native Obsidian exclude API.
  • Hide/Show now builds a rename plan before execution and skips protected areas such as .obsidian/, .git/, and .trash/ automatically.
  • When the destination name already exists (for example, both foo.md and .foo.md are present), the plugin aborts the rename and emits an audit log instead of overwriting either file.
  • Nested children are skipped when their parent directory is already scheduled for renaming, which avoids double-processing the same subtree.
  • The latest batch is persisted so interrupted runs can be undone from the settings page.
  • Each rename records a [file-ignore][audit] line in the developer console, making it easy to trace which paths were changed if something looks wrong.

🧪 Debugging & Troubleshooting

  1. Open Settings → Community plugins → File Ignore.
  2. Enable Debug logging to stream detailed diagnostics.
  3. Use View → Toggle Developer Tools and inspect the Console tab; look for [file-ignore][audit] entries detailing hide/show batches, skipped items, and failures.
  4. Disable the toggle after finishing—normal operation stays quiet unless a warning or error occurs.

🤝 Support

If you encounter any issues or have suggestions for improvements, please visit our GitHub repository to create an issue.

You can also support me by buying me a coffee: Buy Me A Coffee

📄 License

This project is open-sourced under the MIT License - see the LICENSE file for details.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Advanced New File
5 years ago by Ivan Chernov
Create file in chosen folder
Aggregator
3 years ago by SErAphLi
This plugin helps you gather information from files, and make a summary in the file.
Attachments MD Indexer
a year ago by Ian Inkov
Converts Obsidian canvas files to markdown index files, making canvas content searchable and graph-viewable within Obsidian.
Auto File Organizer
a year ago by mofukuru
Obsidian plugin: Automatically organizes files into folders based on their extensions.
Automatically reveal active file
5 years ago by Matt Sessions
Obsidian plugin to reveal the active file automatically when you open a file
Bellboy
4 years ago by Shaked Lokits
Opinionated file structure manager for the Obsidian knowledge base.
Checklist
5 years ago by delashum
Clipper Catalog
a year ago by Greg K.
A catalog view that provides a powerful interface for all your clipped web articles and content. Easily organize, search, and manage your web clippings within your vault.
Confluence Link
2 years ago by Razvan Bunga
Convert obsidian md file into confluence pages
Course Module Loader
a year ago by Sebastian Kamilli
Downloads and unzips course module zip files from a URL into a specified vault folder, skipping existing files.
Current Folder Notes
2 years ago by Pamela Wang
Shows notes in the current folder, useful for writing novels
Easy Bake
3 years ago by mgmeyers
Compile many Obsidian notes down to one.
Edit Gemini
4 years ago by Basil_Mori
Emo
3 years ago by yaleiyale
Use image/file hosting in Obsidian by clipboard or draging file. Obsidian 图床聚合 & Github上传器
Enhanced tables
2 years ago by pistacchio
A plugin for Obsidian to add advanced controls (like sorting and filtering) to standard markup tables
Ffmpeg Converter
2 years ago by MrAnyx
Convert your assets into other formats. Convert, Compress and Optimize your vault
File Cleaner
4 years ago by Johnson0907
A file cleaner plugin for Obsidian.
File Color
3 years ago by ecustic
An Obsidian plugin for setting colors on folders and files in the file tree.
File Cooker
4 years ago by iuian
An obsidian plugin for moving search files to target folder
File Diff
3 years ago by Till Friebe
View the difference between two files within Obsidian.
File Explorer Note Count
5 years ago by Ozan Tellioglu
Obsidian Plugin for viewing the number of elements under each folder within the file explorer
File Explorer++
3 years ago by kelszo
A plugin for https://obsidian.md, which enables the ability to hide and pin specific files and folders in the file explorer by applying custom filters.
File Manager
a year ago by Juan Sicilia
A file manager plugin for Obsidian
File path to URI
5 years ago by Michal Bureš
Convert file path to uri for easier use of links to local files outside of Obsidian
File Tree Alternative
5 years ago by Ozan Tellioglu
This Obsidian Plugin allows users to have a different file explorer experience.
File Tree Generator
3 years ago by Unarray
An Obsidian extension to generate a file tree using callouts!
Find orphaned files and broken links
5 years ago by Vinzent
Find files, which are nowhere linked, so they are maybe lost in your vault.
Fold Properties
2 years ago by James Alexandre
Adds Fold/Unfold Properties Function to Folder Context Menu
Folder Index
4 years ago by turulix
Folder Tabulation
a year ago by SpeedaRJ
An open source plugin for obsidian that let's you treverse local folder structure via keybindings and commands.
Get Info
4 years ago by Chetachi
A small menu that is tucked inside your status bar and shows helpful information for your chosen file 📄.
Git Url
3 years ago by khuongduy354
Hidden Folder
3 years ago by ptrsvltns
obsidian plugin for hidden folder
Home tab
3 years ago by Renso
A browser-like search tab for your local files in Obsidian.
Image Collector
2 years ago by tdaykin
Image Picker
a year ago by ari.the.elk
Import Attachments+
2 years ago by Andrea Alberti
Import attachments by moving them into the vault.
Incomplete files
2 years ago by Hananoshika Yomaru
Rule based incomplete files discovery
Index Checker
3 years ago by Pavlo Deshko
Repo for Index Checker plugin for Obsidian
Index Notes
2 years ago by Alejandro Daniel Noel
Plugin that automatically generates index blocks based on tags
Janitor
4 years ago by Gabriele Cannata
Performs various maintenance tasks on the Obsidian vault
Local File Interface
4 years ago by qawatake
An Obsidian plugin to provide commands for moving files in and out of the vault
Markdoc
3 years ago by Maciej Jur
Basic markdoc support for Obsidian
Metadata Menu
4 years ago by mdelobelle
For data management enthusiasts : type and manage the metadata of your notes.
Modal Opener
2 years ago by Muuxi
Open files and links in modal windows, or create and edit compatible files in modal windows.
Nav Weight
2 years ago by shu307
A simple plugin designed to sort files in navigation based on markdown frontmatter (also known as metadata) for Obsidian.
Neighbouring Files
2 years ago by Fabian Untermoser
Obsidian Plugin to navigate to the next and previous file in the current directory
Nuke Orphans
4 years ago by Sandorex
Obsidian notes plugin that trashes orphaned files and attachments
Open files with commands
3 years ago by Lost Paul
Create commands that only open one file at the time and that can be used with the commander plugin.
Open in GitHub
a year ago by Muurphy Chen
This is an Obsidian plugin designed to open project or files directly in GitHub via your browser.
Open In New Tab
3 years ago by patleeman
Recent Files
5 years ago by Tony Grosinger
Display a list of most recently opened files
Redirect
4 years ago by Jacob Levernier
An Obsidian plugin for adding aliases to any file
Remember File State
4 years ago by Ludovic Chabant
A plugin for Obsidian that remembers cursor position, selection, scrolling, and more for each file.
Review Notes Plugin
3 years ago by tjandy98
Ruled template
3 years ago by YPetremann
An obsidian plugin that check rules to select which template to use.
Scripture Indexer
2 years ago by jdrbrn
Sort Frontmatter
2 years ago by Kanzi
Sort frontmatter automatically
Spreadsheets
3 years ago by Divam Gupta
Static File Server
5 years ago by Elias Sundqvist
Serve obsidian vault subfolders with a static web server
Structured Tree
2 years ago by Marius Svarverud
A file explorer for navigating hierarchical notes separated by '.'
Symlink Creator
2 years ago by Tobias Heidler
A plugin for Obsidian that allows the creation of symlinks - for Windows, OS X and Linux only!
SyncFTP
3 years ago by Alex Donnan
An Obsidian.md plugin that allows users to add their own SFTP host and credentials to sync to and from.
Tags Overview
3 years ago by Christian Wannerstedt
Obsidian plugin which adds an extended tags panel where tagged files can be overviewed, filtered and accessed in an easy way.
Weekly Review
3 years ago by Brandon Boswell
Zoottelkeeper
5 years ago by Akos Balasko
Obsidian plugin of Zoottelkeeper: An automated folder-level index file generator and maintainer.
🪝 Grappling Hook
3 years ago by pseudometa
Obsidian Plugin for blazingly fast file switching. For those who find the Quick Switcher still too slow.