]> git.rmz.io Git - dotfiles.git/commitdiff
vim: add fugitive unite menu and yank history
authorSamir Benmendil <samir.benmendil@gmail.com>
Sun, 24 May 2015 16:35:51 +0000 (17:35 +0100)
committerSamir Benmendil <samir.benmendil@gmail.com>
Sun, 24 May 2015 16:48:15 +0000 (17:48 +0100)
vim/vimrc

index 4fee43023a390b29772065b07fac7330503f4858..83f23795fab8987c949501edd578313dfe674476 100644 (file)
--- 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 <silent> [unite]f :<C-u>Unite -start-insert file_rec/async<CR>
 call unite#custom#default_action('buffer', 'goto')
 nnoremap <silent> [unite]b :<C-u>Unite buffer<CR>
 
+" 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 <Leader>gs' : 'Gstatus',
+            \ 'Gcommit -v <Leader>gc' : 'Gcommit -v',
+            \ 'Glog' : 'Glog',
+            \}
+
+nnoremap <silent> <leader>gg :<C-u>Unite menu:fugitive<CR>
+
+let g:unite_source_history_yank_enable = 1
+nnoremap <silent> [unite]p :<C-u>Unite history/yank<CR>
+
 " yankring {{{2
 nnoremap <silent> <leader>p :YRShow<cr>
 let g:yankring_history_dir = expand('$XDG_CACHE_HOME/vim')