Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mileszs committed Jan 20, 2009
0 parents commit 1650501
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/ack.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*ack.txt* Plugin that integrates ack with Vim

Author: Antoine Imbert <antoine.imbert+ackvim@gmail.com> *ack-author*
License: Same terms as Vim itself (see |license|)

INTRODUCTION *ack*

This plugin is a front for the Perl module App::Ack. Ack can be used as a
replacement for grep. This plugin will allow you to run ack from vim, and
shows the results in a split window.

Ack {pattern} [{directory}] 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 fail, and place the cursor on the matching line.
15 changes: 15 additions & 0 deletions plugin/ack.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
" NOTE: You must, of course, install the ack script
" in your path.
" On Ubuntu:
" sudo apt-get install ack-grep
" ln -s /usr/bin/ack-grep /usr/bin/ack
"
function! Ack(args)
let grepprg_bak=&grepprg
set grepprg=ack\ -H\ --nocolor\ --nogroup
execute "silent! grep " . a:args
botright copen
let &grepprg=grepprg_bak
endfunction

command! -nargs=* -complete=file Ack call Ack(<q-args>)

0 comments on commit 1650501

Please sign in to comment.