Textmate, Rails, Bundler and vendor/bundle

I use Textmate for working on Rails projects and recently started vendoring the app’s gems into vendor/bundle. As a result Textmate got slower when searching and the Go To File command (Command-T) brought up dozens of extra files from the vendored gems.

To exclude those gems Textmate allows you to add a pattern to Folder References (Preferences > Advanced > Folder References) like so:

!.*/(\.[^/]*|vendor/bundle|CVS|...

If you’d prefer to do it on a per-project basis you can open your project and select the root directory, then click the “i” icon in the drawer to bring up the Folder Information dialog. There’s a Folder Pattern item there that will let you make changes specific to that project.

I’m pretty sure I had to quit and re-open Textmate after making the update.