8
votes

Is it possible to just hide, but not exclude from the project? So I can still access them in project search etc?

By hiding I mean not displaying them in sidebar. When I just exclude files from the project I can't access them through Cmd-P.

2
What do yo mean by hide? Could you please edit your question and add more info?sergioFC
I hope this edit is enough to disambiguate my question.kali187
Now I understand what you want, but I don't know how to do it.sergioFC

2 Answers

4
votes

To hide files from the sidebar, you’ll need to:

-Save the current open directory as project (Project > Save Project As) - Open the .sublime-project file and copy the path - Paste in the following code and paste in the path copied above

{
 "folders": [
    {
     "folder_exclude_patterns": [
        "excludedfolder1",
        "excludedfolder2"
     ],
     "path": "/your/project/path/here",
     "file_exclude_patterns": [
        "excludedfilename1.txt",
        "excludedfilename1.txt"
     ]
    }
 ]
}

reference from hiding files in sublime

3
votes

This is not currently possible in Sublime Text 3.

Sublime only allows you to work with files that it knows about, so if they're not included in the project (i.e. not visible in the side bar), then Sublime doesn't know that they exist and can't find for you to search in.

It's only possible to do this in the other direction (have files visible in the side bar but not be able to open them or search in them) by using the binary_file_patterns setting to mask them out.