commit f7b63a51e7f557698bf1b0b3db639c66a06bee2b parent 9189f75551ae9ccc5379988ac76eb1b4dd52728e Author: Anders Damsgaard <andersd@riseup.net> Date: Mon, 2 Apr 2018 22:16:17 -0400 Use ripgrep or the-silver-searcher for :grep if available Diffstat:
M | links/.vim/vimrc | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/links/.vim/vimrc b/links/.vim/vimrc @@ -32,3 +32,12 @@ let g:mutt_aliases_file = '~/.mutt/aliases' " split size for :Lex[plore] and :Hex[plore]. Percentage when positive, line/col " number when negative let g:netrw_winsize = 20 + +" Use faster :grep alternatives when available +if executable("rg") + set grepprg=rg\ --vimgrep\ --no-heading + set grepformat=%f:%l:%c:%m,%f:%l:%m +elseif executable("ag") + set grepprg=ag\ --nogroup\ --nocolor\ --ignore-case\ --column + set grepformat=%f:%l:%c:%m,%f:%l:%m +endif