Sublime Forum

How to prevent ST2 from searching in excluded folders

#1

I’ve got a sublime-project like this:

[code]{
“folders”:

	{
		"path": ".",
		"folder_exclude_patterns": "_doc", "cache", "logs", "_release"],
		"file_exclude_patterns": "*.sublime-workspace"]
	}
]

}
[/code]

In particular I’m excluding _doc, _release, etc. from the project. They seem to be excluded fine since they don’t show up in the side bar. However, when I do a search, ST also searches in this folder and returns all kind of unrelated results.

For instance, if I do this search:


I get results such as this, even though the file is in the _doc folder, which has been excluded:


Any idea how to avoid this?

0 Likes

#2

Anybody know about this? Actually, is it an expected behavior, or a bug / problem with my configuration?

0 Likes

#3

Try removing the “.” from the “where” field and let ST only search in open tabs and folders in the sidebar, it should work this way. I guess that your “.” just overrides that default and includes the excluded folders again. However, you can still exclude folders and files explicitly from the search, see sublimetext.userecho.com/topic/9 … ent_140742

0 Likes