Ag cleanup

This commit is contained in:
ViViDboarder 2015-10-28 10:51:47 -07:00
parent be0a6c50d2
commit 8dce970b22
2 changed files with 5 additions and 6 deletions

View File

@ -65,14 +65,15 @@ let g:grepper = {
\ }
command! -nargs=* -complete=file Grep Grepper! -tool ag -query <args>
nmap <leader>* :Grep<Space>'\b<c-r><c-W>\b'<CR>
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor
command! -nargs=* -complete=file Ag Grepper! -tool ag -query <args>
nmap <leader>* :Ag<Space>'\<<c-r><c-W>\>'<CR>
endif
if executable('ack')
command! -nargs=* -complete=file Ack Grepper! -tool ack -query <args>
nmap <leader>* :Ack<Space>'\b<c-r><c-W>\b'<CR>
endif
if executable('ag')
command! -nargs=* -complete=file Ag Grepper! -tool ag -query <args>
nmap <leader>* :Ag<Space>'\<<c-r><c-W>\>'<CR>
endif
command! Todo Grep TODO
" }} vim-grepper
" }} Fuzzy Find

View File

@ -24,8 +24,6 @@ nnoremap <leader>m :CtrlPMRUFiles<CR>
" 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