Ignore .sass-cache folder in Sublime Text
Updated for Sublime Text 3
When you're using cmd+p to open files in Sublime Text, it's really annoying when you're trying to go to a .scss file and Sublime highlights the .sass-cache version of the file first. No one EVER wants to open a .sass-cache file!
Here's how you can tell Sublime to ignore the .sass-cache folder (and other folders) in your quick find results.
First, go to your Sublime Text -> Preferences -> Settings - General file, and search for "folderexcludepatterns". Copy that whole line.
Next, open your Sublime Text -> Preferences -> Settings - User file, and paste that line in there. Then, add your .sass-cache folder to the array. You have to include the defaults from your general settings or you will reset it to only ignore the sass-cache folder. So, your line should look a little like this:
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", ".sass-cache"]
Add as many folders as you need!
Hint: Don't forget to use a comma when you're entering a new entry into the json file.
Written by Jon Thomas
Related protips
9 Responses
For me this unhid all of the default directories that Sublime Text hides (.git, .svn, etc).
I just copied those from the default config and ended up adding this to my user prefs:
"folderexcludepatterns": [".svn", ".git", ".hg", "CVS", ".sass-cache"]
Interesting. That didn't happen to me, but thanks for sharing in case someone else has that happen.
The same happened to me, but I'm on Sublime Text 3. Maybe the behavior changed between versions.
mkellogg999 is right. If you edit the folderexcludepatterns in your user settings, you have to include the folderexcludepatterns from the default settings.
Defaults:
"folderexcludepatterns": [".svn", ".git", ".hg", "CVS"],
This is because user settings file completely overwrites the default settings, rather than being additive (like CSS files or .profile/.bash_profile).
Thanks for the tips, guys. I updated the original entry.
Life saver.
Awesome tip! Thanks!
Brilliant. Thanks!
PERFECT, thank you!