Thu, 03 Oct 2019 01:16:54 -0500
drop ag.vim; this seems to cover all i do (plus rg)
.vimrc | file | annotate | diff | comparison | revisions |
--- a/.vimrc +++ b/.vimrc @@ -30,7 +30,6 @@ let s:filename = expand('<sfile>') Plug 'Shougo/unite-session' Plug 'sjl/gundo.vim', {'on': 'GundoToggle'} Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'} - Plug 'rking/ag.vim' Plug 'godlygeek/tabular' Plug 'tomtom/tcomment_vim' @@ -124,6 +123,9 @@ command! Gcd call vimrc#Gcd() command! Hgcd call vimrc#Hgcd() command! SyntaxCompleteOn setl omnifunc=syntaxcomplete#Complete +command! -nargs=+ -complete=file -bar Ag sil! gr <args>|cope|redr!|let @/="<args>"|set hls +CAlias Rg Ag + CAlias Q q CAlias Qa qa CAlias W w @@ -226,6 +228,14 @@ if has('persistent_undo') let &undodir = g:vimcache . '/undo//,.' endif +if executable('rg') + set grepprg=rg\ --vimgrep\ --no-heading + set grepformat=%f:%l:%c:%m,%f:%l%m,%f\ \ %l%m +elseif executable('ag') + set grepprg=ag\ --nogroup\ --nocolor\ --vimgrep + set grepformat^=%f:%l:%c:%m +endif + if g:on_windows set guifont=DejaVu_Sans_Mono:h10:cDEFAULT set linespace=0