From 572cfe9d29ee4f51ae5f2a6f5b88eacecd292c41 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Wed, 22 Apr 2015 19:01:54 +0100 Subject: [PATCH] vim: fold each unite source --- vim/vimrc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 3905add..b9d2f84 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -517,23 +517,30 @@ call unite#custom#profile('default', 'context', { \ 'direction': 'botright' \ }) +nnoremap [unite] +nmap u [unite] + +" unite-grep {{{3 " 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]a :Unite grep -input= -nnoremap [unite] -nmap u [unite] +" unite-file_rec {{{3 +if executable('ag') + " Use ag in unite rec source + let g:unite_source_rec_async_command = 'ag --follow --nocolor --nogroup --hidden -g ""' +end nnoremap [unite]f :Unite -start-insert file_rec/async + +" unite-buffer {{{3 call unite#custom#default_action('buffer', 'goto') nnoremap [unite]b :Unite buffer -nnoremap [unite]a :Unite grep -input= " yankring {{{2 nnoremap p :YRShow -- 2.48.1