Sublime Forum

Project-specific ignore in search

#1

hi,

is there a way to ignore certain folders & files in ‘find in project’. for instance i have stuff in my app’s /vendor folder for my rails project showing up in search results (a whole lot of hits im not interested in).

folder & file excludes seem to work just excluding in the sidebar

thanks,
ryan

2 Likes

#2

I’m also looking for something like this. I would like to ignore some cache directories and other files I don’t need as they sometimes come up first :frowning:

1 Like

#3

This is a very old topic, but I’m wondering about the same. Is there a way to define the global search filter (where) in .editorconfig for example? I need to do this every time I open a project:

0 Likes

#4

The "folder_exclude_patterns" and "file_exclude_patterns" settings exclude files from the side-bar, thus excluding them from searches. "binary_file_patterns" can be used to exclude files from find in files while keeping them in the side-bar.

1 Like

#5

Thanks, but aren’t those defined in the user settings? I need something project based because for example in Crystal projects the lib dir should be excluded but in Ruby projects (gems) it should absolutely not.

0 Likes

#6

Those settings can be added to the folders in a sublime-project file to have them applied on a per project basis as well. Note that although they’re setting, in the sublime-project file they go inside of folder entries and not in the "settings" key.

How to set this up is covered in this video as well (though in the video the demo just shows it not appearing in the goto anything panel because I haven’t covered Find in Files yet).

0 Likes