search.vim 673 B

12345678910111213141516
  1. " use faster search tools if available
  2. if executable('ag')
  3. set grepprg=ag\ --vimgrep\ $*
  4. set grepformat=%f:%l:%c:%m
  5. elseif executable('ack')
  6. set grepprg=ack\ --with-filename\ --nocolor\ --nogroup\ --column
  7. elseif executable('ack-grep')
  8. set grepprg=ack-grep\ --with-filename\ --nocolor\ --nogroup\ --column
  9. endif
  10. " EasyGrep settings.
  11. let g:EasyGrepCommand = 1 " Default to grepprg instead of vimgrep.
  12. let g:EasyGrepRecursive = 1
  13. let g:EasyGrepReplaceWindowMode = 2 " Replace in same window, not tabs/splits
  14. let g:EasyGrepFilesToExclude=".git" " Exclude dirs for `ack` and `grep`
  15. let g:EasyGrepRoot = "search:.git,.hg,.svn" " Repo-aware when possible.