I’ve recently been playing with Foundation, Sass, and Grunt. And while each of these are powerful tools in their own right, they are quick to clutter up a project.

Grunt creates a node_modules directory while Sass creates a .sass-cache directory.

But don’t worry, because lucky users of Sublime Text have a simple fix.

Add .sass-cache and node_modules to Folder Excludes List

To exclude a directory from showing up in Sublime’s search and in the sidebar, all you need to do is add it to the folder_exclude_patterns key in your user preferences.

To do this:

  • Click Sublime Text → Preferences → Settings – User
  • Add the snippet below
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", ".sass-cache", "node_modules"],

This line of code should ignore the .sass-cache and node_modules directories as well as common source control directories.

3 thoughts on “Remove .sass-cache and node_modules from Sublime Text

  1. While I don’t really care about the .sass-cache file, I often find myself needing to delve into my project’s dependencies in node_modules. For that reason, I add it to binary_file_patterns, instead of folder_exclude_patterns.


    This allows the folder to still appear in the sidebar, but Sublime isn’t bogged down trying to index its contents.

  2. Although tidying up the file list view, I recommend against hiding the sass cache folder. I don’t use grunt etc, so I like to see caches being generated when I make changes to the stylesheets. Otherwise a helpful tip!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.