Sublime 2 Tip – Excluding minified project files

Sublime Text 2 is my new best friend as an editor.  It is fast, it anticipates my needs, and it doesn’t get in my way.

So far, every nit I have encountered with it has an easy fix.  For example, I often use the “Find In Files…” feature to cross reference where a certain identifier is being used in the code.  I was getting frustrated however, because the minified versions of my CSS and JavaScript were appearing.  Turns out there is an easy way to set it so these files don’t show up.

Go to Preferences -> Settings – Default. Sublime will open a configuration file. I love it, no dialog.  I feel more at home in a config file than a dialog, and this particular config file is very nicely commented.

Scroll down and look for, file_exclude_patterns, then add what you need. Here is what I did:

"file_exclude_patterns": ["*.min.js", "*.min.css", ....

After saving the file, the settings take effect immediately!

Now my global searches are not cluttered with minified results. Back to work…

This entry was posted in Code and tagged . Bookmark the permalink.

Comments are closed.