From 6310b184b26036d4a74bf7446cf764562baad79a Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Fri, 5 Jan 2018 12:15:58 +0100 Subject: [PATCH] More info, better 'ag' checking --- .vimrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 7f56ac5..3380d5f 100644 --- a/.vimrc +++ b/.vimrc @@ -86,10 +86,14 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTree "let g:ctrlp_switch_buffer = 0 " Run your favorite search tool from Vim, with an enhanced results list. -" Supports Silver Searcher `ag` +" Supports Silver Searcher `ag`. Use with: +" :Ack [options] {pattern} [{directories}] Plugin 'mileszs/ack.vim' " apt install silversearcher-ag -let g:ackprg = 'ag --nogroup --nocolor --column' +if executable('ag') + "let g:ackprg = 'ag --nogroup --nocolor --column' + let g:ackprg = 'ag --vimgrep' +endif " fzf integration for fast fuzzy finding, better and faster than ctrl-p set rtp+=~/workspace/projects/others/fzf