Excluding gems in Textmate

Posted on January 18, 2010

I’ve been playing around with Rails 3 lately. Rails 3 uses Bundler which installs all your depending gems inside your app. This does not work very well with Textmate’s default behavior. Textmate will have to search through all gems each time you perform a “Find in project” (Command + Shift + F) or “Go to file” (Command + T) because the gems are inside your project. Due to the many files this is pretty slow, and makes it harder to find what you are looking for.

One simple way to solve this is, is to ask Textmate to exclude the vendor dir. You can do this in Preferences > Advanced. Here, just add ”|vendor” to “Folder pattern” and restart Textmate.

Textmate will now disregard the vendor directory entirely. Problem solved!

If you know a better way of doing this, please drop me a line :)