Sublime Forum

Find in Files excludes folders

#1

Hi,

I have lot of projects, each one in a folder inside a main folder being my ST project folder.
For each subfolder project, I have an “_Old” folder containing old sources codes.
For example:

Development
Project1
_Old
Project2
_Old
Project3
_Old

Is there a way to use “Find in Files” command so it doesn’t search inside these “_Old” folders ?

Thanks
Kib

0 Likes

#2

If you use the ST3 projects feature, you can exclude folders from the project. I believe this will also exclude them from being searched via “Find in Files”. So if you are happy for all those _Old folders to be excluded from the side bar, then use Project/Edit Project to edit your <whatever>.sublime-project file to be something like:

"folders":
[
    {
        "path": "path to your project root directory; this should already be defined",
        "file_exclude_patterns": [ "._*" ],
        "folder_exclude_patterns": [ "_Old" ]
    }
],
0 Likes

#3

Thanks Blurk, yes I know about that and indeed is exclude them from Find in Files. But I prefer having them accessible from the side bar, so it’s not really a solution.

In Find in Files, in where field, I can do:
,-/_Old/

This works, and seems remember between session, so it does the trick. But having it in a config file would help for sure.

0 Likes