Commit 68f897f

mo khan <mo@mokhan.ca>
2013-12-03 04:35:14
bind "F" to search using silversearcher.
1 parent 2e9586e
Changed files (1)
vimrc
@@ -70,7 +70,11 @@ set smartcase   " ... unless they contain at least one capital letter
 set showmatch   " briefly jump to the matching bracket.
 nnoremap / /\v
 vnoremap / /\v
-
+nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
+if executable('ag')
+  command! -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw!
+  nnoremap F :Ag<SPACE>
+endif
 " }}}}
 
 "" Wild settings {{{{
@@ -292,7 +296,6 @@ nnoremap <leader>gb :Gblame<cr>
 
 " ctags
 nnoremap <leader>T :!ctags -f tags -R<cr>
-nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
 
 " }}}}