Add button on search to toggle excluded files/folders

Use case or problem

I currently have my top level folders set up as follows:

  • Inbox
  • Active
  • Resources
  • Archive

Currently Archive houses everything that I want to exclude from search. However if I decide I want to do a ‘deep dive’ I have to go into settings remove the archive folder from excluded, search, then remember to add it again once I’m finished.

Proposed solution

It would be nice if there was a button in the row where the current search buttons are such as Match Case, Explain Search Term etc that allows you to toggle whether excluded folders are included in the search or not.

Current workaround (optional)

One possible work around is to not use Excluded Folders and instead have a starred search of ‘-path: Archive’ however you don’t get the benefits of having the archived files being made less relevant when using the quick switcher.

9 Likes

I need exactly this. I have a couple of folders that I keep in my main vault for linking purposes, but don’t want them gumming up search and quick switcher (daily notes as a scratch pad for ideas and a work folder for all work related things). I’d love to exclude them from search when at all possible UNLESS I decide that I’d like to search them. Manually changing the settings to include them is tedious and time consuming. I’m going to try the workaround of keeping the folders excluded, but using the plugin omnisearch when I need to drill into these folders, but I don’t like having to use two different search tools.

2 Likes

+1. I’d love this. My Archive folder contains all of my archived notes that I typically don’t need to backlink or switch to. But sometimes when I use search I want to see if there are results from this folder. I constantly find myself going into the settings to exclude/unexclude this folder.

I like that in the Wikilink selection and in the Quick Switcher the “excluded” files are just sorted to the bottom and greyed out so they are less obvious. I wish this behavior applied to the search as well.