From 4358a57a61c6aa6330902467980d75b48648f119 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Sun, 24 May 2015 17:35:51 +0100 Subject: [PATCH] vim: add fugitive unite menu and yank history --- vim/vimrc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 4fee430..83f2379 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -29,6 +29,8 @@ Plugin 'raimondi/delimitmate' " Plugin 'rking/ag.vim' Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/syntastic' +Plugin 'shougo/vimproc.vim' +Plugin 'shougo/unite.vim' Plugin 'sjl/gundo.vim' Plugin 'tomtom/tcomment_vim' Plugin 'tpope/vim-endwise' @@ -63,8 +65,6 @@ 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 set runtimepath -=$HOME/.vim @@ -542,6 +542,20 @@ nnoremap [unite]f :Unite -start-insert file_rec/async call unite#custom#default_action('buffer', 'goto') nnoremap [unite]b :Unite buffer +" unite-menu {{{3 +let g:unite_source_menu_menus = {} +let g:unite_source_menu_menus.fugitive = { 'description' : 'fugitive menu'} +let g:unite_source_menu_menus.fugitive.command_candidates = { + \ 'Gstatus gs' : 'Gstatus', + \ 'Gcommit -v gc' : 'Gcommit -v', + \ 'Glog' : 'Glog', + \} + +nnoremap gg :Unite menu:fugitive + +let g:unite_source_history_yank_enable = 1 +nnoremap [unite]p :Unite history/yank + " yankring {{{2 nnoremap p :YRShow let g:yankring_history_dir = expand('$XDG_CACHE_HOME/vim') -- 2.48.1