Skip to content

Instantly share code, notes, and snippets.

@scudco
Created May 6, 2009 23:42
Show Gist options
  • Save scudco/107814 to your computer and use it in GitHub Desktop.
Save scudco/107814 to your computer and use it in GitHub Desktop.
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