Skip to content

Commit

Permalink
Remove ag.vim since it's deprecated
Browse files Browse the repository at this point in the history
See rking/ag.vim#124 (comment)

The auther recommended using the original ack.vim that is what ag.vim
was forked from.  I also remapped :ag to :Ack and set :Ack to use the ag
command if it's available.
  • Loading branch information
justyns committed May 15, 2018
1 parent b32c972 commit 44f6925
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 2 additions & 3 deletions vim/plugs.vim
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ Plug 'bling/vim-airline'
Plug 'tpope/vim-sensible'

" searching / grep - only loaded when invoked
Plug 'mileszs/ack.vim', { 'on': 'Ack' }
Plug 'rking/ag.vim', { 'on': 'Ag' }
Plug 'mileszs/ack.vim', { 'on': ['Ack', 'Ag'] }

" navigation
Plug 'ctrlpvim/ctrlp.vim' " , { 'on': ['CtrlP', 'CtrlPBuffer', 'CtrlPMixed'] }
" netrw has some bugs when using it as a "sidebar", so just use NerdTree for
" now if I need it. Load on demand.
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' }
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'majutsushi/tagbar'
Plug 'majutsushi/tagbar', { 'on': 'TagbarToggle' }

" Syntax hilighting for various things
Plug 'ekalinin/Dockerfile.vim' " , { 'for': 'dockerfile' }
Expand Down
8 changes: 7 additions & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,15 @@ set title " Change the title in the terminal
cmap w!! w !sudo tee % >/dev/null
let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp' " Persist ctrlp cache to disk
" If ag is installed, use it for ctrlp instead of the built in search

" Check if ag (the_silver_searcher) is installed
if executable('ag')
" If ag is installed, use it for ctrlp instead of the built in search
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" Also use it for ack.vim due to https:/rking/ag.vim/issues/124#issuecomment-227038003
let g:ackprg = 'ag --vimgrep --smart-case'
cnoreabbrev ag Ack
cnoreabbrev Ag Ack
endif

" For chef berkshelf
Expand Down

0 comments on commit 44f6925

Please sign in to comment.