5 ms·
Nice Find: An asynchronous find in project plugin for TextMate
- mcav 17y agoThis 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?
- rubbish 17y agoM-x rgrep That's one option. There's also find-dired. I also believe there are a bunch of different extensions that can do this as well (find-in-project, etc.).
- gcv 17y agoQuite 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.
- philjackson 17y agoAs a side note; check out find-cmd.el (comes with 23).
- mechanical_fish 17y agoAnd, 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 http://www.emacswiki.org/cgi-bin/wiki/igrep.el A lot of people have attacked the grep problem in emacs.
- mdemare 17y agoI have the same question, but for Vim. Also, for find-and-replace. I think it requires a plugin, but I'm baffled why it isn't there out-of-the-box. (Unless it is there, and I haven't found it yet.)
- kneath 17y agoThis 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 http://github.com/protocool/ack-tmbundle No beachballs, and you get the crazy awesome speed of ack.
- naz 17y agoI 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 17y agoAny chance nice_find can have an option for following symlinks?
- naz 17y agoFor grep, sure.
- chadr 17y agoIt 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 17y agoI created an issue and I will definitely look into it http://github.com/briancollins/nice_find/issues/#issue/2 http://github.com/briancollins/nice_find/issues/#issue/2
- joshwa 17y agoI 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 http://github.com/protocool/ack-tmbundle edit: jinx!
- tlrobinson 17y agoNow if only TextMate didn't hang when loading a large directory, or a directory containing a circular symlink path...
- iloveyouocean 17y agoI 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 17y agoYou'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
- jpcx01 17y agoI'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 17y agoWe 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 17y agoFrom 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.)