Better ag/ack

This commit is contained in:
ViViDboarder 2014-11-04 10:17:21 -08:00
parent 0efdca96d8
commit ced4cff3d5

15
vimrc
View File

@ -27,9 +27,11 @@ Plugin 'sandeepcr529/Buffet.vim' " Quick buffer switching
Plugin 'majutsushi/tagbar' " Ctags file parsing Plugin 'majutsushi/tagbar' " Ctags file parsing
Plugin 'scrooloose/syntastic' " Syntax checking Plugin 'scrooloose/syntastic' " Syntax checking
Plugin 'ViViDboarder/QFixToggle' " Easy Toggle of QuickFix window Plugin 'ViViDboarder/QFixToggle' " Easy Toggle of QuickFix window
" TODO: detect if Ag or Ack is installed if executable('ag')
Plugin 'rking/ag.vim' " Project searching Plugin 'rking/ag.vim' " Project searching
"Plugin 'mileszs/ack.vim' " Project Searching else
Plugin 'mileszs/ack.vim' " Project Searching
endif
" -- Text Manipulation -- " -- Text Manipulation --
" Easy comments " Easy comments
@ -338,6 +340,15 @@ nnoremap <leader>t :CtrlPBufTag<CR>
nnoremap <leader>r :CtrlPTag<CR> nnoremap <leader>r :CtrlPTag<CR>
nnoremap <leader>u :CtrlPCurFile<CR> nnoremap <leader>u :CtrlPCurFile<CR>
nnoremap <leader>m :CtrlPMRUFiles<CR> 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 -g ""'
" ag is fast enough we don't need cache
let g:ctrlp_use_caching = 0
endif endif
" fugitive " fugitive