Skip to content

Instantly share code, notes, and snippets.

@zhhz
Created December 22, 2008 14:12
Show Gist options
  • Save zhhz/38998 to your computer and use it in GitHub Desktop.
Save zhhz/38998 to your computer and use it in GitHub Desktop.
" all credits to antoine,
" more details see: http://blog.ant0ine.com/2007/03/ack_and_vim_integration.html
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>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment