background preloader

Beyond grep: ack 2.14, a source code search tool for programmers

Beyond grep: ack 2.14, a source code search tool for programmers

ggreer/the_silver_searcher mileszs/ack.vim rking/ag.vim Ack and Vim integration - ant0ine's blog I'm a fan of Andy Lester's App::Ack module. This a is a perl program that you can use as a replacement of grep. Today I wrote a little Vim plugin that integrate ack with Vim. This is a quick hack, it works for me with vim7/ubuntu and vim6.3/fedora. Just copy/paste the following lines in ~/.vim/plugin/ack.vim " usage: " (the same as ack, except that the path is required) " examples: " :Ack TODO . " :Ack sub Util.pm function! ack-1.60 is out, and the documentation mentions another way to integrate ack and vim by using the :grep function of vim: set grepprg=ack I think this is a better solution, and to make it nicely integrated withvim, I wrote this new little function: function! Just replace the old code by the new one in ~/.vim/plugin/ack.vim This time it works even if you don't specify the path, and you can still use the :grep function as before, grepprg is saved and restored. And as Yann says, "then :cnext is your friend"

Related: