Wednesday, June 20, 2007

Remove "Find In Project" From TextMate

I love TextMate, but "Find In Project" drives me nuts. It's always crashing my box. I e-mailed TextMate's creator asking if he could just remove the feature from the next release. The response I got was incredibly cool. Instead of giving me the virtual finger, he told me you can do it like this:

sudo open /Applications/TextMate.app/Contents/Resources/English.lproj/MainMenu.nib

This command opens TextMate's UI in Interface Builder, which allows you to remove it from the menu. Removing it from the menu clobbers the key-command shortcut too, so it effectively removes the feature from your install completely.

It works. I dig it.

5 comments:

  1. Are you excluding folders when you open up projects? Personally, I don't like dealing with project files, I use the mate command to open directories of files up. For rails projects, I use something like this: "mate app config db lib public script spec test", which I alias to 'mr'. This leaves out the log and vendor directories which tend to have a lot of content that doesn't usually need to be searched.

    ReplyDelete
  2. Yeah, I don't do project files either, I just use mate also. I have found "Find In Project" pretty fast inside ActiveRecord, I have a mate alias for that, and of course the reason is it's a small file - likewise excluding log can speed up the searches considerably - but all you have to do is have a 32MB SQL dump in there that you forgot about and the whole approach is doomed. grep's faster and more fully-featured, just not as pretty, so this time around I had to go back to my Unix roots.

    ReplyDelete
  3. I've stopped using it too -- it's just too slow. My replacement is a zsh function:

    g() {
    find . -iname "*.$1" | xargs grep -n ${2-`pbpaste -pboard find`}
    }

    I use it like this: g rb "def to_s".

    That said, TM 2 is supposed to have a much-improved Find in Project.

    ReplyDelete
  4. that's nicely compact. my shell version is infinitely more dumb:

    grep -n "$1" `find .` | grep -v ".svn"

    ReplyDelete
  5. You must all have some huge projects.
    $ du -s project
    69728 project
    $ ls -lR|wc -l
    42077

    Search in Project takes maybe 10 seconds for the first search and <1 sec after that. Regexp and ignore case unselected. PowerBook G4 1.67, 1.5GB RAM.

    Very usable for me :)

    ReplyDelete

Note: Only a member of this blog may post a comment.