ack.vim : Plugin for the Perl module / CLI script 'ack'
script karma |
Rating 169/65,
Downloaded by 9015 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Miles Sterrett |
|
script type |
utility |
|
description |
This plugin is a front for the Perl module App::Ack. Ack can be used as a replacement for 99% of the uses of grep. This plugin will allow you to run ack from vim, and shows the results in a split window.
Search recursively in {directory} (which defaults to the current directory) for the {pattern}.
Files containing the search term will be listed in the split window, along with the line number of the occurrence, once for each occurrence. [Enter] on a line in this window will open the file, and place the cursor on the matching line.
Where you would use :grep, :grepadd, :lgrep, and :lgrepadd, you can use :Ack, :AckAdd, :LAck, and :LAckAdd respectively.
For more information, and to check out the unstable, development version of the plugin, go here: http://github.com/mileszs/ack.vim/tree/master
This Vim plugin is derived (and by derived, I mean copied, essentially) from Antoine Imbert's blog post Ack and Vim Integration (http://blog.ant0ine.com/2007/03/ack_and_vim_integration.html) (in particular, the function at the bottom of the post). |
|
install details |
Ack
You have to install ack, of course.
Install on Ubuntu with:
sudo apt-get install ack-grep
Install on Gentoo with:
sudo emerge ack
Install with MacPorts:
sudo port install p5-app-ack
Install with Gentoo Prefix
emerge ack
Otherwise, you are on your own.
The Plugin
Unpack the gzipped archive from within ~/.vim, and you should be good to go.
mv ack.tar.gz ~/.vim
cd ~/.vim
tar xvzf ack.tar.gz
Otherwise, the file ack.vim goes in ~/.vim/plugin, and the ack.txt file belongs in ~/.vim/doc.
Be sure to run
:helptags ~/.vim/doc
afterwards. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.188.127.79
|