Skip to content

Instantly share code, notes, and snippets.

@Makistos
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Makistos/700340f20658236058f7 to your computer and use it in GitHub Desktop.
Save Makistos/700340f20658236058f7 to your computer and use it in GitHub Desktop.
Using Ack.vim in Ubuntu 12.04 #vim #vimrc

Command-line

sudo apt-get install ack-grep
sudo dpkg-divert --local --divert /usr/bin/ack --rename --add /usr/bin/ack-grep

.vimrc

nnoremap <leader>a :Ack 
" Search for word under cursor
nnoremap <leader>A :Ack <C-r><C-w> 
" Fix for Ack < 2.0 
let g:ack_default_options = " -H --nocolor --nogroup --column"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment