Hacker News new | comments | show | ask | jobs | submit login
VimAck: A port of TextMate's Find-in-Project feature for MacVim.app (github.com)
51 points by jtaby on May 29, 2011 | hide | past | web | favorite | 32 comments

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

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.

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?

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.

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.

It puts the results in a quickfix window, which has a well-defined set of keybindings for navigation and refinement.

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.

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_...

I use ack.vim, which outputs to vim's quickfix window: https://github.com/mileszs/ack.vim

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 :)

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"

Nice work. I am using lusty juggler's buffer grep right now for something similar.

Yea, I just found LustyBufferGrep and BufferJuggler this weekend and am definitely digging it.


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.

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.

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.

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.

Thanks for the feedback, I'm going to prioritize those features for the next release :)

Thank you for this. This has definitely been a "missed feature" for awhile now.

I would love to see this feature implemented in a similar way for Emacs.

Adding support for other editors was something I am definitely mulling over, maybe version 2

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.

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.

Are you an Emacs user?

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.

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.

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.

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.

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...

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.

Already exists in the form of ack mode, which is better integrated with the editor.



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

Edited to provide examples.

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/

Applications are open for YC Summer 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact