Permalink
Browse files

Go back using ag on vim

  • Loading branch information...
1 parent c34d542 commit e615a57dff3c2995d5691eadc9badd6db9402bbd @fuadsaud committed Jan 15, 2014
Showing with 12 additions and 0 deletions.
  1. +12 −0 vim/rc.vim
View
@@ -114,6 +114,18 @@ let g:loremipsum_files = { 'en': expand('~/.vim/mussumipsum.txt') }
let g:gist_clip_command = 'pbcopy'
let g:gist_detect_filetype = 1
+" The Silver Searcher
+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 ""'
+
+ " ag is fast enough that CtrlP doesn't need to cache
+ let g:ctrlp_use_caching = 0
+endif
+
" keymaps
let mapleader = ','

0 comments on commit e615a57

Please sign in to comment.