if executable('ag') let g:ackprg = 'ag --vimgrep --smart-case' " Use the_silver_searcher for Ack noremap \ :Ack noremap :Ack " Use Ag over Grep set grepprg=ag\ --nogroup\ --nocolor " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' endif