]> git.rmz.io Git - dotfiles.git/commitdiff
vim: fold each unite source
authorSamir Benmendil <samir.benmendil@gmail.com>
Wed, 22 Apr 2015 18:01:54 +0000 (19:01 +0100)
committerSamir Benmendil <samir.benmendil@gmail.com>
Sun, 24 May 2015 16:48:15 +0000 (17:48 +0100)
vim/vimrc

index 3905add6679e51019a9de68c88649a77f46c7e17..b9d2f846914527c77cbf986f9fa0ce81f0cb645f 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -517,23 +517,30 @@ call unite#custom#profile('default', 'context', {
             \ 'direction': 'botright'
             \ })
 
+nnoremap [unite] <Nop>
+nmap <leader>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 <silent> [unite]a :<C-u>Unite grep -input=\12\17<CR>
 
-nnoremap [unite] <Nop>
-nmap <leader>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 <silent> [unite]f :<C-u>Unite -start-insert file_rec/async<CR>
+
+" unite-buffer {{{3
 call unite#custom#default_action('buffer', 'goto')
 nnoremap <silent> [unite]b :<C-u>Unite buffer<CR>
-nnoremap <silent> [unite]a :<C-u>Unite grep -input=\12\17<CR>
 
 " yankring {{{2
 nnoremap <silent> <leader>p :YRShow<cr>