Ignoring files and folders in Sublime Text
Published:
I love the file search (ctrl+shift+f) and quick navigate (ctrl+p) in Sublime Text. What can be annoying however is when these present you with library code in your project, files related to source control, binary files or minified files.
Since I keep forgetting how to clean that up, here's a note to self (and others) on how to clean that up. Easy peasy.
- Save as project (if you haven't already)
- Edit project file
- Add
file_exclude_patterns
and/orfolder_exclude_patterns
to thefolders
section.
Below is an example from one of my current projects which excludes the git repo folder, a cache folder, minified files and some binary files.
{
"folders": [
{
"path": "/D/dev/www/some-website",
"folder_exclude_patterns": [".git", ".cache"],
"file_exclude_patterns": ["*.mp3", "*.ogg", "*.pdf", "*.min.*"]
}
]
}