X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/7c88a7e3070226a781dd523b05a6d99acdfa98ba..aee86b894d70dd7dfee9b3bb7fb48d1c8a61be06:/vim/vimrc?ds=sidebyside diff --git a/vim/vimrc b/vim/vimrc index 9284bf5..3905add 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 @@ -517,13 +513,27 @@ let g:UltiSnipsListSnippets="" " unite {{{2 call unite#filters#matcher_default#use(['matcher_fuzzy']) call unite#custom#profile('default', 'context', { - \ 'start_insert': 1, \ 'winheight': 20, \ 'direction': 'botright' \ }) -nnoremap [unite] -nmap u [unite] -nnoremap [unite]f :Unite buffer file_rec + +" seems not respected +let g:unite_source_grep_max_candidates = 2000 +if executable('ag') + " Use ag in unite rec source + let g:unite_source_rec_async_command = 'ag --follow --nocolor --nogroup --hidden -g ""' + " 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 -start-insert file_rec/async +call unite#custom#default_action('buffer', 'goto') +nnoremap [unite]b :Unite buffer +nnoremap [unite]a :Unite grep -input= " yankring {{{2 nnoremap p :YRShow