Skip to content

Commit

Permalink
vim: use ack.vim instead of ag.vim
Browse files Browse the repository at this point in the history
ag.vim is deprecated (rking/ag.vim#124). Use ack.vim with the proper
glue to use it with ag.
  • Loading branch information
osandov committed Oct 21, 2019
1 parent 1aec6c2 commit 256d69e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ if isdirectory($HOME . "/.vim/bundle/Vundle.vim")

Plugin 'chrisbra/SudoEdit.vim'
Plugin 'ervandew/supertab'
Plugin 'rking/ag.vim'
Plugin 'mileszs/ack.vim'
Plugin 'scrooloose/nerdcommenter'
" Until https://github.com/tpope/vim-fugitive/pull/1381 is merged.
Plugin 'osandov/vim-fugitive'
Expand Down Expand Up @@ -193,6 +193,20 @@ endif
" SuperTab scroll down
let g:SuperTabDefaultCompletionType = "<C-N>"

" Make ack.vim use ag.
let g:ackprg = 'ag --vimgrep'
" Add Ag aliases for all of the Ack commands.
command! -bang -nargs=* -complete=file Ag call ack#Ack('grep<bang>', <q-args>)
command! -bang -nargs=* -complete=file AgAdd call ack#Ack('grepadd<bang>', <q-args>)
command! -bang -nargs=* -complete=file AgFromSearch call ack#AckFromSearch('grep<bang>', <q-args>)
command! -bang -nargs=* -complete=file LAg call ack#Ack('lgrep<bang>', <q-args>)
command! -bang -nargs=* -complete=file LAgAdd call ack#Ack('lgrepadd<bang>', <q-args>)
command! -bang -nargs=* -complete=file AgFile call ack#Ack('grep<bang> -g', <q-args>)
command! -bang -nargs=* -complete=help AgHelp call ack#AckHelp('grep<bang>', <q-args>)
command! -bang -nargs=* -complete=help LAgHelp call ack#AckHelp('lgrep<bang>', <q-args>)
command! -bang -nargs=* AgWindow call ack#AckWindow('grep<bang>', <q-args>)
command! -bang -nargs=* LAgWindow call ack#AckWindow('lgrep<bang>', <q-args>)

" Plugin autocmds
augroup vimrcPlugin
au!
Expand Down

0 comments on commit 256d69e

Please sign in to comment.