Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posted
23 July 2007 @ 1pm

Tagged
Rails, Ruby, Usability

Discuss

Make Textmate’s “find in project” faster in Rails projects

Textmate’s “find in project” feature is great, but if you use it within any substantial Rails projects it can get very slow, especially as cruft builds up in the log folder or if you use vendor/rails. This is easily fixed, however — go into your textmate preferences, then “folder references”, and change “folder pattern” to the following:

updated: go here for the code now, wordpress was stripping some slahes.

If you parse the regex, you’ll see we modified the first set of exclusions (denoted by the “^”). This is why we added ‘vendor/rails’, ‘log’, and ‘tmp’ along side some version control exclusions that are included by default. If you want to exclude anything else, for example all plugins (”vendor/plugins”), just add it there with a pipe (”|”), which is the reg ex equivalent of “OR”.

You’ll have to reopen any projects for this to take effect, and you may have to create new projects to pick up this exclusion, if you use saved projects. After opening a project, you can look in the project sidebar and verify that the ‘log’ and ‘tmp folder dont’ show anymore. Find in project will be fast and friendly again.


7 Comments

Posted by
Dr Nic
23 July 2007 @ 3pm

Noice. I’ve wondered where I could clean up that stuff before. Champion.


Posted by
Jeroen
24 July 2007 @ 8am

This is really cool, unfortunately, after trying this I suddenly see all the invisible .svn folders in my projects.


Posted by
Rob
24 July 2007 @ 8am

Jeroen: See the update above….


Posted by
Branstrom
24 July 2007 @ 11pm


Posted by
Karen Cassandra Cenon
4 November 2007 @ 2pm

need txtmate

09107603623


Posted by
Krishna
6 November 2007 @ 5pm

Hey, that works great. I modified it differently (leave vendor/rails in so I can dig into the source, remove some other folders I had), but same idea.

Much better than ‘grep in project’, which is clunky and does not support search and replace.


Posted by
Joannou Ng
28 February 2008 @ 2pm

Acceptable, but not ideal, coz one might need to open those hidden files in TextMate at some point.


Leave a Comment

Upgraded Wordpress… Did redgreen get borked?