&*#%! I Made Grep in Project slow... and then I fixed it
Henrik Nyh’s Grep in Project is awesome, so awesome that I think it should replace Textmate’s existing Find in Project. Today I tried it out on a project with a reasonably sized ferret index and, even though it balked a bit, I did actually get a response.
Since I don’t really care about any results in the ferret folders, I decided to patch the command a bit:
--- Grep in Project.tmCommand
+++ (clipboard)
@@ -111,7 +111,7 @@
HTML
# TODO: Respect ENV['TM_SELECTED_FILES']
-command = %{cd "#{directory}"; find . \\( -path '*/.svn' -or -path '*/vendor/rails' \\) -prune -or -type f -print0 | xargs -0 grep -nr --ignore-case --fixed-strings --exclude='*.log' #{e_sh query}}
+command = %{cd "#{directory}"; find . \\( -path '*.ferret' -or -path '*/.svn' -or -path '*/vendor/rails' \\) -prune -or -type f -print0 | xargs -0 grep -nr --ignore-case --fixed-strings --exclude='*.log' #{e_sh query}}
IO.popen(command) do |pipe|
Now Grep in Project is as fast as before, yay.
P.S. Notice how it already ignores vendor/rails and .svn folders? Well done, Henrik.

