diff --git a/vim/rc/plugins.rc.vim b/vim/rc/plugins.rc.vim index ea06aba..0958824 100644 --- a/vim/rc/plugins.rc.vim +++ b/vim/rc/plugins.rc.vim @@ -65,14 +65,15 @@ let g:grepper = { \ } command! -nargs=* -complete=file Grep Grepper! -tool ag -query nmap * :Grep'\b\b' +if executable('ag') + set grepprg=ag\ --nogroup\ --nocolor + command! -nargs=* -complete=file Ag Grepper! -tool ag -query + nmap * :Ag'\<\>' +endif if executable('ack') command! -nargs=* -complete=file Ack Grepper! -tool ack -query nmap * :Ack'\b\b' endif -if executable('ag') - command! -nargs=* -complete=file Ag Grepper! -tool ag -query - nmap * :Ag'\<\>' -endif command! Todo Grep TODO " }} vim-grepper " }} Fuzzy Find diff --git a/vim/rc/plugins/ctrlp.rc.vim b/vim/rc/plugins/ctrlp.rc.vim index 6f24264..b2231b4 100644 --- a/vim/rc/plugins/ctrlp.rc.vim +++ b/vim/rc/plugins/ctrlp.rc.vim @@ -24,8 +24,6 @@ nnoremap m :CtrlPMRUFiles " Special stuff for The Silver Searcher if executable('ag') - " use ag - set grepprg=ag\ --nogroup\ --nocolor " use ag for CtrlP let g:ctrlp_user_command = 'ag %s -l --nocolor --nogroup -g ""' " ag is fast enough we don't need cache