# HG changeset patch # User Meredith Howard # Date 1570083414 18000 # Node ID 152f0c95cbb0d27be8f7183bd129f091e43f6d8d # Parent 20281f6e1c001ddd92d2b2ee66446f41dda608da drop ag.vim; this seems to cover all i do (plus rg) diff --git a/.vimrc b/.vimrc --- a/.vimrc +++ b/.vimrc @@ -30,7 +30,6 @@ let s:filename = expand('') 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 |cope|redr!|let @/=""|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