Skip to content

Instantly share code, notes, and snippets.

@arseto
Last active May 3, 2018 02:59
Show Gist options
  • Save arseto/39f47df0a8830f96b9d7476bf3134763 to your computer and use it in GitHub Desktop.
Save arseto/39f47df0a8830f96b9d7476bf3134763 to your computer and use it in GitHub Desktop.
Use `ag` over `grep` for ctrlp.vim
" source: https://stackoverflow.com/questions/2372307/opening-files-in-vim-using-fuzzy-search
if executable('ag')
" 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment