Sublime Forum

Separate "binary_file_patterns" configs for "Goto Anything" vs "Find in Files"

#1

I’d like to be able to find image files quickly via “goto anything”.

IIUC, to get that right now I have to remove image extensions from “binary_file_patterns”, but that also means they’re searched by “Find in Files”, which I don’t want since it clutters up search results with:

/my/file/path.jpg:
    <binary>

Would it be possible to have separate configs for “Find in Files” vs “Goto Anything” for binary files? Or something like that?

0 Likes

#2

I don’t think that’s possible, no; the binary_file_patterns controls both of those options at the same time, with the theory being that anything that is binary is probably not meant to be searched, and you probably don’t want to view it either.

That said, image_file_patterns exists now in order to indicate what files should be opened as images and not as text (and thus probably binary).

So, I could totally see a world in which Sublime allows files to be opened and seen via Goto Anything if it also appears in image_file_patterns.

That’s not possibly currently, but it seems like a reasonable feature request; you could request it via Help > Report a Bug, which will take you to the issue tracker.

In the interim I don’t think there’s any good way to achieve the same thing though.

0 Likes