The where field doesn’t work the way you think it does. Any term that doesn’t start with a - is an inclusion, adding to the list of things to search. If you’re familiar with the terminology, this represents a boolean combination of or, not of and.
In effect, the where string that you’re using is telling sublime to search for files containing the word main:
- In the folder
craft/templates/ (any file found inside)
- In the folder
public/foundation/ (any file found inside)
- In the folder
craft/plugins/ (any file found inside)
- Inside files whose names match
*.scss (in any folder in your project)
Based on your original question about wanting only Sass files, the where path you need is:
craft/templates/*.scss, public/foundation/*.scss, craft/plugins/*.scss
This tells sublime “search only inside of scss files inside each of these three directories”.
Depending on the content of the folders in question, you could also use exclusions in the where field. As an example, if the folders that you are searching only contains scss, js and js.map files, you could use a where of:
craft/templates, public/foundation/, craft/plugins, -*.js, -*.js.map
Which tells sublime "Look for the text in all of the files in these three folders except for files of type js and js.map. This can get to be a bit of a bear if there are a lot of file types, though.