Sublime Forum

Exclude folders from search but show in side bar

#21

At build 3143 binary_file_patterns works. But as mentioned in @OdatNurd’s post above it doesn’t work if a folder is specified in the ‘Where’ field of find in files… I’d also like to +1 the suggestion to allow this setting in project settings as well as globally. It’s generally most valuable in that context.

:slight_smile:

0 Likes

#22

Support for this (per project setting) was added in Dev build 3158, so if you’re a registered user you can try it right now; otherwise it should be available in the next stable build.

0 Likes

#23

@OdatNurd what exactly was added ? I’m running Build 3164 and it still doesn’t work when I add

{
	"binary_file_patterns": ["*-bundle.js"],
        "file_exclude_patterns": ["*-bundle.js"], 
        "folder_exclude_patterns": ["webpack"]
}

To my project file and I try to run a search for some string in the folder “/Users/Me/dev/projectFoo/app” : it returns search results inside /Users/Me/dev/projectFoo/app/assets/webpack/webpack-bundle.js:

(it DOES work when I add them to my own user Preferences.sublime-settings though)

0 Likes

#24

Those settings need to be applied to each folder in the project, like this:

{
    "folders":
    [
        {
            "path": ".",
            "binary_file_patterns": ["*-bundle.js"],
            "file_exclude_patterns": ["*-bundle.js"], 
            "folder_exclude_patterns": ["webpack"]                
        }
    ]
}
2 Likes

#25

this is being tracked at

1 Like