Sublime Forum

Binary_file_patterns does't work in Sublime3 3083 on folders

#1

binary_file_patterns does not behave like it does in sublime 2.
I’m trying to exclude folders from the find but not from the sidebar, but binary_file_patterns doesn’t do the job despite what many online answers seem to say. ( a lot of comments for these answers mention that it doesn’t work in sublime 3)

e.g: I’m trying to exclude any folder called build, but this doesn’t work with this in the user Preferences.sublime-settings:

[code] “binary_file_patterns”:

            "build",
	"*/build/*",
	"/build/*",
	"build/*",
	"build/**",
	"\\build\\*",
  "D:\\<fullpath>\\build\\*",
],[/code]

running win8, 64 bit, sublime 3 3083.
I’ve tried restarting sublime, etc. no dice.

0 Likes

#2

I suspect binary file patterns only work on the filename. I never had a different use case for them.

Since it is your intention to exclude an entire folder, you should look to use “folder_exclude_patterns” instead: docs.sublimetext.info/en/latest/ … ect-format

0 Likes

#3

[quote=“FichteFoll”]I suspect binary file patterns only work on the filename. I never had a different use case for them.

Since it is your intention to exclude an entire folder, you should look to use “folder_exclude_patterns” instead: docs.sublimetext.info/en/latest/ … ect-format[/quote]

Unfortunately, “folder_exclude_patterns” removes the folder from the sidebar as well, which is undesirable in many cases.
Like many solutions online point out, http://stackoverflow.com/questions/13706965/limit-file-search-scope-in-sublime-text-2 (answer 2 even mentions it working for sublime 3 at some point) , “binary_file_pattern” does work for folders, but it doesn’t seem to work for the latest version of sublime.

0 Likes

#4

Oh sorry, i missed the “trying to exclude folders from the find but not from the sidebar” part in your OP.

Iirc this is requested but unavailable feature.

0 Likes

#5

[quote=“FichteFoll”]Oh sorry, i missed the “trying to exclude folders from the find but not from the sidebar” part in your OP.

Iirc this is requested but unavailable feature.[/quote]

but like I said, it’s available and functional in previous versions of sublime

0 Likes

#6
0 Likes

#7

Doesn’t seem to be in package control anymore:
packagecontrol.io/search/FindExcludePatterns

packagecontrol.io/browse/authors/titoBouzout

github.com/titoBouzout/FindExcl … s/issues/1

0 Likes

#8

Most likely he hasn’t bothered to put it up on PackageControl. He might not have intention to do so, idk. I would just drop the python file in your user folder, or check it out to your packages directory for now.

0 Likes

#9

FindExcludePatterns hardly seems ideal as it renders the “Where:” field virtually useless, it’s so full of stuff.

Is it really the case that binary_file_patterns simply no longer works? How is it that so few people seem bothered by this? Surely almost everyone has a build/* or a node_modules/* or something that needs to be ignored by global search?

0 Likes

#10

I just ignore those folders completely. Well, not “dist”, but there are only binary files in it anyway.

0 Likes

#11

Regardless, there are still valid cases for excluding a folder from the search but not the sidebar. The problem is that functionality that seemed to exist before, no longer works.

0 Likes

#12

This is the first time I use this feature and unfortunately it does not work for me as well.
I prefer to use it at per-project level… so I put the option inside sublime-project file.

folder_exclude_patterns works so I assume binary_file_patterns would work too.
As mentioned by other users, I would like to see all my folders at sidebar,
but i dont want to see them in Goto Anything or Goto Symbol/Definition

I’m on Windows 10, build 3109

0 Likes

Exclude binary files from search
#13

I think it is now called “Find Results Apply Changes”.

0 Likes

#14

@tito actually removed all his packages from Package Control, so I’m not sure why there is even any result listed.

Also, you’re talking about different packages.

0 Likes

#15

Still doesn’t work anymore in stable build 3103.
I miss so much this feature!

0 Likes

#16

Any update on this? At the moment, binary_file_patterns excludes folder only from Palette, but not from Find in Files.

0 Likes

#17

If anyone is still checking this thread out, this now works in Build 3211.
by using [folder_name]/* you can exclude the files in that folder from Find but those folders still remain in the sidebar as expected.

0 Likes