Use case or problem
I’m holding my programming snippets in Obsidian too, however, since it’s a big folder with so many notes irrelevant to all my other non-programming notes, I’d like to be able to search it only directly when I’m using the path:snippets
query, but exclude it otherwise anytime that I’m not including any path:snippets
query.
Proposed solution
In the settings, I want to exclude the snippets
directory from the search results so that my searches are less littered with irrelevant results, however, I still want to be able to search that folder when I specify it as my search path explicitly.
When a certain path is specified explicitly, the search exclusion rule must not be respected.
Current workaround (optional)
I have to put ALL my non-snippet files within a new directory (eg, call it myspace
), and my snippets in another directory (call it snippets
), so that these two spaces are separate, now I can specify path:myspace
and path:snippets
) for separate search results, however, this solution is ugly and I don’t like to move all my important non-snippet files and put them in second depth under a new directory.
Related feature requests (optional)
Not quite related to my main request, however, with regards to the 3rdparty right-click search plugin that I’m using (GitHub - liamcain/search-from-directory: Obsidian plugin that adds a menu item for searching within a folder), on another feature request, a moderator said they were going to add this feature to the core so that a folder could be searched by directly right clicking on it, without having to write the path
query in the search box manually everytime, however, it’s not been added yet! Or maybe “I” can’t find it. (Here’s that request: Right-click on a folder and search within it) Also the comments are closed there. So just mentioning it.