

Nice Find: An asynchronous find in project plugin for TextMate - naz
http://github.com/briancollins/nice_find

======
joshwa
I use "Ack In Project" which is also pretty nice, and can be configured to
show context around search results:

<http://github.com/protocool/ack-tmbundle>

edit: jinx!

------
kneath
This seems like a good effort, but I think I'll stick with the tried and true
ack-in-project <http://github.com/protocool/ack-tmbundle>

No beachballs, and you get the crazy awesome speed of ack.

~~~
naz
I used ack-tmbundle before creating nice_find, and it drove me mad for two
reasons. Firstly, the command doesn't work from the project unless you have
one of its files open. Secondly, pressing the hotkey to bring back your search
results will display a modal dialog over your results.

It's not the developer's fault, they did a great job. It is limitations of
being a tmbundle. If you look on AIP's lighthouse page you will see that they
can't resolve these problems. That's what drove me to write a plugin instead.

Also Ack (a perl script) is slower than grep -r and git-grep ignores all the
irrelevant files. But feel free to fork it to use Ack.

~~~
chadr
Any chance nice_find can have an option for following symlinks?

~~~
naz
For grep, sure.

~~~
chadr
It appears to follow symlinks if I uncheck 'Use git-grep'. Unfortunately, if
it finds a file (by following a symlink) it seems to always open the file in a
new window instead of a tab.

~~~
naz
I created an issue and I will definitely look into it
<http://github.com/briancollins/nice_find/issues/#issue/2>

------
mcav
This is going to be _immensely_ useful.

I've one unrelated question for _emacs_ users, since I'm trying to wean myself
off of TextMate: How do you accomplish this same type of "find-in-multiple-
files" in emacs?

~~~
gcv
Quite a few ways.

1\. Start with M-x rgrep, it may do everything you need.

2\. If not, M-x find-grep lets you run arbitrary grep commands. You may wish
to customize grep-find-command to some reasonable default, e.g., mine:

    
    
        (setq grep-find-command
              (concatenate
               'string
               "find . \\( -path '*.svn' -o -path '*.git' -o -path '*.hg' \\)" 
               " "
               "-prune -o -type f -print0 | xargs -0 grep -I -i -n -e "))
    

3\. If you want to just search open buffers, you may find M-x multi-occur-in-
matching-buffers useful. I use this simple wrapper, which you invoke using M-x
search-all-buffers:

    
    
        (defun search-all-buffers (regexp)
          (interactive "sRegexp: ")
          (multi-occur-in-matching-buffers "." regexp t))
    

4\. You may find filtering files and query-based search replace useful, in
which case you should try dired-mode. It does a lot, so try marking files
(look in the Mark menu for various options), then operate on them (Operate
menu). For example, hit "% m" to mark files by name regex, type "\\.[c|h]" to
mark all C and header files, then press "Q" to start interactive search-and-
replace through all marked files.

5\. I don't know of a direct equivalent to Nice Find, e.g., basing a search on
"git grep" output, but if you look through the various Git modes, you may find
something useful.

~~~
mechanical_fish
And, amazingly, you managed to get through this whole list without mentioning
igrep-find, which is what I've been using:

<http://www.emacswiki.org/cgi-bin/wiki/igrep.el>

A lot of people have attacked the grep problem in emacs.

------
iloveyouocean
I installed the bundle. Now when I open a TextMate project file, and try cmd-
shift-f, NiceFind will search in the parent directory of the TextMate project
file, but not through all of the files in the project.

??

~~~
naz
You're using tmproj files? I'll add support for those to the "coming soon"
list, I have only tested on folders as projects so far. Sorry about that. You
can remove the plugin by removing:

~/Library/Application\ Support/TextMate/Plugins/NiceFind.tmplugin

~~~
priit
I'll vote +1 up for the .tmproj support. It would be the next step up from the
awesomeness then :)

------
tlrobinson
Now if only TextMate didn't hang when loading a large directory, or a
directory containing a circular symlink path...

------
jpcx01
I'm excited about this app. It's barely usable (doesn't respect textmate's
file ignore patterns, no replace, and it doesn't report progress very well).
But, it's fast, and hopefully it continues progress to make things a bit
cleaner.

However... god damn, is Textmate ever the saddest project I've ever seen. Why
the fuck are we still using this abandoned app? Seriously...

~~~
naz
We keep getting told TM2 is around the corner and we keep believing him. As
for the lack of features, I thought I'd release early and iterate :)

~~~
mechanical_fish
From the TM FAQ:

 _Q: Will TM2 be a free upgrade?

Yes. Except for users who got TM1 as part of the MacHeist package. The
MacHeist TM1 license will require an upgrade fee in order to upgrade to TM2._

When I read this, years ago, I saw it as a sign that the author of TM might
not stay in business for very long. I can't imagine a paid TM user who would
balk at a $39 upgrade, let alone a $29 or $19 upgrade -- we're talking about
the kind of software that you use for 8 hours per day -- and yet the guy has
_left that money on the table_. In _advance_. (Once you've announced a free
product, you'll have a hell of a time charging money for it later.) I can't
help but wonder whether the endlessly delayed TM2 ship date results from the
author's having surgically removed all of his own incentives.

(Actually, it's odder than that: Even if TM2 doesn't collect upgrade dollars,
its release would drive the marketing of new licenses, so delaying it is
costing the author money no matter what. Perhaps money doesn't matter to the
author. In which case the project is even more likely to be doomed.)

If you're going to be in the paid, closed-source development tools business,
_be_ in the paid, closed-source development tools business. The business is
"we give you money to work on the software, and the software gets better." It
is not "we don't give you money and the software sits frozen in time." That
niche is already thoroughly occupied by emacs and vi. ;) [1]

\---

[1] Though, joking aside, the universe of emacs tools has been steadily
improving, especially now that TM has helped to increase its userbase by
teaching people the power of a decent text editor. (vi may be improving too,
but I wouldn't know, since I don't really use it.)

~~~
Maciek416
As it happens I just emailed the Textmate guys to ask about what was going on
with TM2. Actually, I asked how much a hypothetical "Textmate Liberation Fund"
would have to raise to get Allan & co to open source Textmate.

Here's the reply I got:

 _Right now we are working hard on getting 2.0 out the door, we haven't really
been thinking of much other than that. ;)_

translation: <shrug>

~~~
mechanical_fish
Let this be a lesson in what free software is about.

It's not about the low price. It's not because the people who make closed-
source software aren't talented, or generous, or that their software isn't
worth the money.

It's that closed-source software is under the exclusive control of one person
or one corporation. You are at the mercy of the whims, incentives, and
fortunes of a tiny group of people. And the odds that their desires will
remain aligned with yours are poor indeed.

And it's not as if this is an iPhone Twitter app, where you can switch from
one to another in a few minutes. Or even Mac OS X, which is Unix -- though I
love my Mac OS toolset, I reserve the ability and the right to install Ubuntu
and come back up to speed in a few days. No, this is your _text editor_. It
can take weeks or months to thoroughly learn a new one, and it's the
centerpiece of your professional life.

~~~
cglee
Really, I agree with everything you're saying. But sometimes paid apps just
feel better, and I'm really hoping that all will be forgiven once TM2 blows
our minds.

