From 6e04badbe658cfb487d0bda38f02a9d6b4d15cc0 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Wed, 22 Apr 2015 14:53:51 +0100 Subject: [PATCH] vim: use unite instead of Ag --- vim/vimrc | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 9284bf5..dd4b7b7 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -26,7 +26,7 @@ Plugin 'wilywampa/python-mode' Plugin 'kshenoy/vim-signature' Plugin 'majutsushi/tagbar' Plugin 'raimondi/delimitmate' -Plugin 'rking/ag.vim' +" Plugin 'rking/ag.vim' Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/syntastic' Plugin 'sjl/gundo.vim' @@ -63,6 +63,7 @@ Plugin 'justinmk/vim-sneak' Plugin 'chrisbra/checkattach' Plugin 'nathanaelkane/vim-indent-guides' Plugin 'alx741/vinfo' +Plugin 'shougo/vimproc.vim' Plugin 'shougo/unite.vim' " remove entries first @@ -400,11 +401,6 @@ cnoremap w!! w !sudo tee % > /dev/null inoremap gUiwgi " plugins options {{{1 -" ag {{{2 -let g:AgSmartCase = 1 -nnoremap ag yiw:Ag " -vnoremap ag y:Ag " - " airline {{{2 let g:airline#extensions#whitespace#enabled = 1 let g:airline#extensions#tabline#enabled = 1 @@ -521,9 +517,20 @@ call unite#custom#profile('default', 'context', { \ 'winheight': 20, \ 'direction': 'botright' \ }) -nnoremap [unite] -nmap u [unite] + +" seems not respected +let g:unite_source_grep_max_candidates = 2000 +if executable('ag') + " Use ag in unite grep source. + let g:unite_source_grep_command = 'ag' + let g:unite_source_grep_default_opts = '--smart-case -w --vimgrep --hidden --ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr''' + let g:unite_source_grep_recursive_opt = '' +end + +nnoremap [unite] +nmap u [unite] nnoremap [unite]f :Unite buffer file_rec +nnoremap [unite]a :Unite grep -input= " yankring {{{2 nnoremap p :YRShow -- 2.48.1