Config to ignore/hide select files and folders

Would be useful in some cases to be able to have Obsidian ignore specified files/directories, optionally at different scopes too.

for example
I use Obsidian to manage content on a Jekyll-generated website. This means that in my Vault I have all the templates, assets, plugins, includes as well as the generated site’s files.

I can imagine editing .obsidian/config “ignore” directives such as

"ignore": {
  "scopes": {
    "file_viewer" : (
     "_site","_includes","_layouts","_assets","_data"
    ),
    "graph" : (
     "_site","_includes","_layouts","_assets","_data","_zettlen"
    ),
    "search" : (
     "_site","_includes","_layouts","_assets","_data"
    ),
    "sync" : (
     "_site","_includes","_layouts","_assets","_data"
    )
  }
}

Net effect for me in this case would be
a) my file list in the sidebar isn’t cluttered with files I’ll never edit on Obsidian and
b) link autocomplete search isn’t suggesting things that aren’t posts/pages/collection docs…

Just a thought, hope someone else might think this would be useful.

:slight_smile: :+1:

99 Likes

I would like this also. Sounds like a good plugin.

3 Likes

Related discussion of a (more basic) approach: Ignore a folder of temporary notes

2 Likes

I couldn’t find any answers for this in the forum. Is it possible to exclude folders from the Quick Switcher. I’m likely never going to want to switch to a file in my attachments folder so it’d be nice to exclude that specific folder.

Also, the same issue applies when searching for pages after opening wikilinks square brackets [[

8 Likes

Would find it really useful too!
I usually name my embedded pictures for what they are showing and as for now, they show up in quick search and obscure what I’m looking for. :wink:

5 Likes

Yes!
I requested something similar, but simpler, although I like your idea. Mine was just to hide the clutter in the navigation tree (although I want the option to see them for drag & drop links). Your request seems to be to hide the files/folders altogether, which I’m sure might come in pretty handy once people have been using Obsidian for a few years and have a massive accumulation of files.

https://forum.obsidian.md/t/option-to-display-hide-filetypes-in-navigation-bar-on-the-left/11328?u=lise

2 Likes

+1 from me specifically be able to exclude folders like fleeting, daily, and attachments from quick switcher. being able to selectively specify exclusion criteria per folder as in the above example would be great.

3 Likes

+1 I put all illustrations in images folder. As these images have already been embedded in our notes, it makes no sense to search them in obsidian.

3 Likes

I’m desperate for this tbh. I’m doing a history research project about one thing, and, for example, I might do a project related to queer people in history someday down the road. I want to be able to save an expert of a passing mention of some likely/definitely queer historical person that i might come across in my reading for a different project, without those pages cluttering up & overwhelming my … whatever it’s called when you do [[ and possible links show up. My ADHD brain gets overwhelmed easily with clutter so it’s kind of a huge problem for me- even within my current project.

I’d soo badly need the ability to do something like (this is just an example for illustrative purposes): hit [[xKEYWORD and the approrpriate results pop up, with x being a preset option which limits my search to, say my “People” or “Concept” folder. Or excludes certain folders. I’m legit afraid to keep my project in Obsidian bc it’s small now and it’s still tolerable, but only just-- as my vault grows, I think i will massively lose the ability to link things because my brain wont be able to deal with this bit :frowning:

5 Likes

@ameyawarde: I understand what you mean. Below, I have a few suggestions that you may already be well aware of, but I figured it wouldn’t hurt.

You may find it helpful in the meantime to create a note for a certain category with various items as headings and subheadings within that note.

The items will still be easily searched and linked to and from (even from within a single note). One slight drawback would be that if you have many links to those items (headings) and decide you want to create independent notes from one of the headings, you will have to do a search and replace throughout your entire vault to replace all links that had previously gone to that heading. This is possible using a mass search and replace in VSCode or Atom. It is quite simple actually.

In terms of being distracted by the suggestions when typing a link, in certain cases you may find it easier to create links by dragging and dropping notes from the explorer into a note or doing searches and use the functionality that can generate a list of links to all results and copy that to the clipboard to be be pasted into a note.

Anyways, good luck.

Thanks.

2 Likes

At present, we can do this by relying on the fact that ‘Obsidian can’t contain symlink’, but this feature may fail at any time.

1 Like

I think this function is really necessary. For me, obsidian not only manages notes, but also manages all kinds of markdown files, such as those in an NPM.

But sometimes there will be a lot of unnecessary markdown files attached to it. If you don’t exclude them, it will be a serious waste of resources and reduce efficiency.

1 Like

:point_up: this exactly. This is me trying to search for ‘pa’ or ‘past’
image

9 Likes

Yeah as my vault grows Quick switcher is becoming unusable because of this problem.

1 Like

Is there any way to do this with a CSS snippet?

I know nothing about what you can or can’t do with CSS, but I was able to find that any images (or any non .md files really) have a div that contains the little PNG or whatever tag that shows up to the left of the file name in the explorer, and said div has a nav-file-tag class assigned to it that normal note names in the Explorer don’t.

1 Like

It would be nice to be able to ignore some files / folders. Examples :

  • node_modules/
  • python files (comment start with #, so they are mistaken for tags)
6 Likes

Very much can relate. Especially when your vault grows larger, Quick Switcher basically becomes soooooo noisy…

I do not really see a solution to this now apart from naming .folders like this to hide. It does not seem to be a feature on the road map radar either, unfortunately. :pensive:

2 Likes

+1 from me on this thread. There’s the option to exclude paths on search (-path:daily_notes -path:events -path:templates) but in situations where we’re doing this for every search it just becomes a bit crazy. It would be great to have a setting in the Search plugin that lets you specify these exclusions as standard.

3 Likes

+1 from me on this thread too. I would like to hide the folder that contains my literature notes since I don’t want them to show as results in the quick switcher.

1 Like

Same here too. I’d love to remove the attachments from the quick switcher results. These attachments are all images and when I want to quick-switch to another file, I actually never ever want to see the attachments in the results list.

Especially since they’re displayed exactly the same way as a markdown note, it makes it much harder to scan the list of results and know which one I want to open.

2 Likes