In Sublime Text, I often use Cmd+P/Ctrl+P to search and jump between files.
Often, it would pick up temporary or cached files like .scssc or things in the /tmp folder.
Is there a way that I can limit what is shown in the search result?
In Sublime Text, I often use Cmd+P/Ctrl+P to search and jump between files.
Often, it would pick up temporary or cached files like .scssc or things in the /tmp folder.
Is there a way that I can limit what is shown in the search result?
For SublimeText 2, this is working great for me.
When you choose Find in Files, specify exclude folders in Where input;
So, a hyphen followed by exclude pattern for folders you don't want to search in.
This will limit your searching scope.
For Sublime Text 3: To exclude from search and GoTo results, without removing from the sidebar, change the
"binary_file_patterns"
setting. Matches files AND folders.For example, to exclude files in "dist" and "node_modules" from GoTo indexing, add this to your User Settings file:
I can't figure out how to implement this on a per-project basis :(. Most settings can be moved to a
project.sublime-project
file. "Project > Save Project As", save it the root of your project, and add"settings": {...}
to the json in the generated file. (from source, works as of ST3 build 3095). But does not work with "binary_file_patterns".This solution works perfectly for me : https://superuser.com/a/601270
You can also exclude folders in the Find All pane by using the
-*/foldername/*
syntax in theWhere
field - eg:http://www.sublimetext.com/forum/viewtopic.php?f=2&t=3847&start=10
Just note that if you want to add a subfolder of your project folder, you must to join the folders with
\/
. Using the same example of @DavidPärsson:You can exclude certain file patterns and folders from your project by modifying your project settings like so:
This is described in the projects documentation.