X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/8bd148c792c06fb41c01cc798bc3b194e237a603..8213ab5f29ad2271f01acc84fcdcba75eb2ac95e:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 79e7b71..4fee430 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -428,7 +428,7 @@ autocmd BufReadPost fugitive://* set bufhidden=delete nnoremap gs :Gstatus nnoremap gd :Gdiff -nnoremap gc :tab Gcommit -v +nnoremap gc :Gcommit -v nnoremap ga :Gwrite nnoremap gb :Gblame @@ -517,6 +517,10 @@ 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') @@ -525,12 +529,19 @@ if executable('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 nnoremap [unite]a :Unite grep -input= +" 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 + " yankring {{{2 nnoremap p :YRShow let g:yankring_history_dir = expand('$XDG_CACHE_HOME/vim')