Skip to content

Commit

Permalink
vimrc: make AG default grep tool + add shortcuts for quick grep
Browse files Browse the repository at this point in the history
  • Loading branch information
DamZiobro committed Dec 21, 2016
1 parent 526410b commit ea0cc32
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -1073,3 +1073,12 @@ nnoremap <leader><leader>] f]ci]
" assign q; to avoid shift pressing when searching last ex commands
nmap q; q:
vmap q; q:
" " ========================================================================================
" use ag as default grep tool if it is installed on the machine
if executable("ag")
set grepprg=ag\ --nogroup\ --nocolor\ --ignore-case\ --column
set grepformat=%f:%l:%c:%m,%f:%l:%m
endif

map <leader>gr :grep <C-R><C-w><CR><CR><CR>
vmap <leader>gr :grep <C-R><C-w><CR><CR><CR>

0 comments on commit ea0cc32

Please sign in to comment.