Sublime Forum

"folder_exclude_patterns" not working for .git folder

#1

The “.git” folder is added to the “folder_exclude_patterns” in “Preferences.sublime-settings – Default” and I have also tried adding it to “Preferences.sublime-settings – User”, but I keep seeing the folder in my sidebar and it is still included in searches. Restarting Sublime does not help.

In the “-- User” settings I also have “node_modules” in the “folder_exclude_patterns” and this does work.

1 Like

#2

According to your screenshot, folder_exclude_patterns is currently set to exclude only node_modules and vendor, nothing else. Settings from your User package take precedence over the defaults, so if you want to augment the existing list with more items, you need to copy the default to your User settings and then add them there.

Just adding the setting and putting those two folders in it is telling Sublime that you want only those two excluded, and not the defaults.

1 Like

#3

Wow, I was sure I had checked this (multiple times even), but I must have done that without a restart. You are right! Somehow I was convinced that the settings “stacked”, but the one in the User package actually completely overwrites the one in Default. I fixed it and restarted and it works now, thanks! :grinning:

1 Like