Sublime Forum

How use index_exclude_patterns in Dev Build 3058

#1

‘Added index_exclude_patterns setting to control which files get indexed’ in Build 3058
how use?

0 Likes

[ST3] [OSX-10.9] Freezing from index_files with large folder
#2

I assume it’s just:

"index_exclude_patterns": "*.sql", "*.log"]

It may be different though.

0 Likes

#3

Actually, I would like to know what are the implicit rules that determine what files would be indexing by default.
It seems that this part is undocumented.

0 Likes

#4

Anything under 4GB gets indexed, I’m sure I read that somewhere. I don’t think images, archives or executables get indexed either.

0 Likes

#5

By default, every non-binary file (as identified by binary_file_patterns) in the project under 4MB will be indexed.

0 Likes

#6

Would be nice to update the documentation:

Nice feature, but wasted if no one knows how to use it.

0 Likes

#7

I expect this is the same for a lot of hidden settings.

0 Likes

#8

Is there a way to exclude the contents of folders from being indexed? Something like

 "index_folder_exclude_patterns": "tmp", "server"]
0 Likes

#9

[quote=“tolmark12”]Is there a way to exclude the contents of folders from being indexed? Something like

 "index_folder_exclude_patterns": "tmp", "server"]

+1 for this. I’ve been hoping for something like this to be able to exclude a “node_modules” folder from search in a project, while still including it in the side panel for manual browsing. This would be a great addition.

I was hoping that something like the following would work when doing a search within a project, but it doesn’t.

 "index_exclude_patterns": "node_modules/*"]

Right now I have to manually add in a custom pattern in “where” when doing a “Find in Files…”.

*.hbs, *.scss, *.less, *.html, *.cshtml, *.js, *.json, -node_modules

Another thing that would be great would be to add in an inverse command for indexing only certain types of files, while being able to keep file patterns not included in your project.

 "index_include_patterns": "*.hbs", "*.scss", "*.less", "*.html", "*.cshtml", "*.js", "*.json"] 
0 Likes

#10

This is causing a bad bug when opening large projects or any heavy-populated node_modules folder (encounters “number of files to index exceeds sanity limit, bailing out”) that makes ST3 unusable with indexing turned on.

To me, “node_modules” or “bower_components” should be disabled from indexing by default.

0 Likes