Sublime Forum

How can I get Sublime Search to ignore the same files as .gitignore?

#1

This seems to me to be core functionality. Right now I have to duplicate (and worse than that, use 2 syntaxes) my .gitignore settings in folder_exclude_patterns and file_exclude_patterns.

And yet, Sublime clearly knows which is which because it grays out the folders that git is ignoring.

This costs me a lot of time.

Am I an idiot and just missing something or is this missing?

Please someone respond before my tears fry my computer.

1 Like

#2

Not related but if you are willing to use an external tool, it’s the default behavior for ripgrep and it’s blazing fast. For ripgrep, there are flags to turn off the respect to .gitignore.

-u, --unrestricted
        Reduce the level of "smart" searching. A single -u won't respect .gitignore
        (etc.) files. Two -u flags will additionally search hidden files and
        directories. Three -u flags will additionally search binary files.

        'rg -uuu' is roughly equivalent to 'grep -r'.
3 Likes

#3
2 Likes