News for hackers. Stuff that matters.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by spicycode on Sunday May 29, 2011 @03:15PM (#2597291)
Just use ack.vim [1]. It works from any vim instance and is a standard vim plugin.

[1] http://www.vim.org/scripts/script.php?script_id=2572

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by jtaby on Sunday May 29, 2011 @03:17PM (#2597298)
The problem with a native vim window is that it doesn't give you much affordance in terms of UI, you can't collapse files that have a lot of matches, hard to remember options and syntax for regex/case sensitivity, etc.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by smosher on Sunday May 29, 2011 @06:42PM (#2597808)
The collapsing sounds like a valid complaint. The rest falls on deaf ears for this vim user.

I would expect most vim users to feel the same since those complaints are either considered features or the common barrier to entry that vim has anyway. Am I wrong?

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by jtaby on Sunday May 29, 2011 @09:42PM (#2598147)
You can consider it a matter of preference, I suppose. I prefer having a GUI file browser over NERDTree for similar reasons as I outlined before. VimAck has the same line of thinking behind it.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by smosher on Sunday May 29, 2011 @09:51PM (#2598170)
Yeah, I totally get that. I'm just assuming that the average vim user is going to prefer things to work vim-native over anything else.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by spicycode on Sunday May 29, 2011 @09:49PM (#2598162)
It puts the results in a quickfix window, which has a well-defined set of keybindings for navigation and refinement.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by zefhous on Sunday May 29, 2011 @04:03PM (#2597434)
This is a great start!

I have ack.vim installed, but I frequently open the project in TextMate to search with TM's AckMate bundle. Project search one of the last things with Vim that I haven't had a good solution to.

ack.vim works, but it blocks vim so you can't do anything while it's working, and also the quickfix window is not ideal for a lot of uses.

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by beaumartinez on Sunday May 29, 2011 @03:11PM (#2597275)
From the screencast[1] it looks like this doesn't support keyboard navigation―why is the search an OS-native window and not a Vim window?

[1] https://github.com/jtaby/VimAck/raw/master/resources/vimack_...

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by dchest on Sunday May 29, 2011 @03:14PM (#2597290)
I use ack.vim, which outputs to vim's quickfix window: https://github.com/mileszs/ack.vim
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by jtaby on Sunday May 29, 2011 @03:15PM (#2597294)
As I noted in the roadmap, keyboard support is coming, feel free to fork and contribute if you're up to it in the meantime :)
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by mrinterweb on Sunday May 29, 2011 @07:59PM (#2597964)
This looks nice, but I prefer the functionality provided in vim. In your .vimrc, you can set grepprg to ack, grep, or (my favorite super fast search) git grep. Then if you want to display the results just type ":copen".

Example: "set grepprg=git\ grep\ -n"

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by fictorial on Sunday May 29, 2011 @07:41PM (#2597930)
Nice work. I am using lusty juggler's buffer grep right now for something similar.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by askedrelic on Sunday May 29, 2011 @10:16PM (#2598237)
Yea, I just found LustyBufferGrep and BufferJuggler this weekend and am definitely digging it.

http://www.vim.org/scripts/script.php?script_id=1890

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by burgerbrain on Sunday May 29, 2011 @08:20PM (#2597988)
I've used the following in Vim for years now:

  :nmap <C-f> :!ack <cword><CR>
No sense in being any more complex than that, as far as I can tell.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by jtaby on Sunday May 29, 2011 @08:24PM (#2597990)
Well, the reason I built this is that it's much nicer to browse the results IMO. You can collapse files, you get bolded fonts, you get different colors, and much better use of whitespace. It's also easier to define options like regex and case-sensitivity vs. having to remember the flags in the command.

The benefit is one of UI/UX, it doesn't actually perform an action you couldn't perform text-only.

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by shennyg on Sunday May 29, 2011 @05:50PM (#2597701)
Nice work.

A few notes:

"Button" label should say search or go.

There is no "results not found"

It is hard to tell if it is doing anything, maybe add a animated icon showing it is working.

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by jtaby on Sunday May 29, 2011 @06:44PM (#2597812)
Thanks for the feedback, I'm going to prioritize those features for the next release :)
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by jarin on Sunday May 29, 2011 @03:06PM (#2597262)
That is pretty nice, although I found myself using 'git grep' even with Textmate (before I switched to vim) because it was much faster than TM's Find in Project.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by gte910h on Monday May 30, 2011 @03:22AM (#2598760)
Thank you for this. This has definitely been a "missed feature" for awhile now.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by beatlevic on Sunday May 29, 2011 @03:41PM (#2597358)
I would love to see this feature implemented in a similar way for Emacs.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by jtaby on Sunday May 29, 2011 @04:10PM (#2597453)
Adding support for other editors was something I am definitely mulling over, maybe version 2
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by alnayyir on Sunday May 29, 2011 @04:29PM (#2597506)
We (emacs) already have like 5-6 ack modes, I beg of you, don't add to the list. Just find which one you like best and offer improvements.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by beatlevic on Sunday May 29, 2011 @06:25PM (#2597785)
That is true, but we don't have something like this peep open style, with a nice mac feel to it. Or am I missing one? I like this polished style instead of a fully integrated version in emacs.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by alnayyir on Sunday May 29, 2011 @09:29PM (#2598112)
Are you an Emacs user?
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by beatlevic on Monday May 30, 2011 @03:32AM (#2598785)
Yes, but features like ackMate, projectDrawer and visual style make me use Textmate quite a lot (for Ruby dev), which is a pitty because I'm used to my emacs shortcuts. I know most (all?) features are implemented in Emacs, but often in a more spartan way.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by alnayyir on Monday May 30, 2011 @12:29PM (#2599764)
You haven't really absorbed why Emacs does things the way it does. Spend more time tinkering with Emacs Lisp and you'll see what I mean.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by beatlevic on Monday May 30, 2011 @12:58PM (#2599841)
Trust me, I have been tinkering a lot with Emacs lisp, and I really miss some nice visual features. Spend some time tinkering with Textmate and see what I mean ;) I am all for leaving the mouse alone and efficiency, but working on a mac makes me a sucker for eye candy as well. Take for instance again peep open, which is in my opinion a nicely styled plugin, for which I would love to see a 'find in project' equivalent.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by alnayyir on Tuesday May 31, 2011 @03:20AM (#2601740)
I am an experienced TextMate user, and when I went back to using Emacs after a hiatus with TextMate, one of the first things I did was import everything I liked about TextMate into Emacs.

The functionality you mention exists for Emacs.

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by beatlevic on Tuesday May 31, 2011 @10:21AM (#2602678)
Instead of telling me it exists, please show me a visually appealing 'find in project' plugin/package. Which got this whole discussion started in the first place...
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by alnayyir on Tuesday May 31, 2011 @05:38PM (#2604746)
Visually appealing is relative, if you like the way TextMate et al looks and value that sort of thing, Emacs isn't for you anyway.
Re:VimAck: A port of TextMate's Find-in-Project feature for ... by alnayyir on Sunday May 29, 2011 @03:46PM (#2597383)
Already exists in the form of ack mode, which is better integrated with the editor.

https://github.com/defunkt/emacs/blob/master/vendor/ack.el

http://nschum.de/src/emacs/full-ack/

There are others, but this should suit anybody's needs.

Edited to provide examples.

Re:VimAck: A port of TextMate's Find-in-Project feature for ... by jroes on Sunday May 29, 2011 @06:40PM (#2597803)
Defunkt has actually ported a lot of cool textmate features including find-in-project over here in textmate.el: https://github.com/defunkt/textmate.el/