Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide files/folders on my search but not in my side bar

I'm using sublime text 3 and I want to exclude files/directories but not in my sidebar.

For example...

I have those files:

  1. /doc/blabla/event.rb with the text some content in it.
  2. /app/event.rb with the text other content in it.

So, with Ctrl + P (find files) and writing "event" I want to see only /app/event.rb.

and, with Ctrl + Shift + F (find in all files) and writing "content" I want to see results, again, only for /app/event.rb

I configure sublime with this values into my Preferences.sublime-settings:

"folder_exclude_patterns": ["doc"],

this works beautifully but, it hides doc directory from sidebar too. I don't want this behavior. I only want to hide files from my search

like image 979
Leantraxxx Avatar asked Nov 28 '13 15:11

Leantraxxx


People also ask

How do I hide folders in search bar?

To hide one or more files or folders, select the files or folders, right-click on them, and select Properties. On the General tab on the Properties dialog box, check the Hidden box in the Attributes section. To prevent the files or folders from appearing in Windows search results, click Advanced.

Can folders be hidden?

To hide a file or folder on Windows, open a Windows Explorer or File Explorer window and locate the file or folder you want to hide. Right-click it and select Properties. Enable the Hidden checkbox on the General pane of the Properties window. Click OK or Apply and your file or folder will be hidden.


1 Answers

For me, using Sublime 3 build 3083 binary_file_patterns was not working while I had the setting in the project.sublime-project file. Once I moved it to my Preferences.sublime-settings and added an '*' to the search it started excluding the folder from search results while leaving it in the sidebar. My Preferences.sublime-settings looks like so:

"binary_file_patterns":
    [
    "public/bower_components/*",
    "public/javascripts/vendor/*",
    "public-built/*"
    ],

and it works beautifully for me in sublime 3.

Also talked about in this post: http://blog.lysender.com/2014/08/sublime-text-exclude-files-or-directories-from-go-to-anything-feature/

like image 184
Typenine Avatar answered Dec 25 '22 08:12

Typenine