]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
vim: add more bindings for git commit and git push
[dotfiles.git] / vim / vimrc
index 82617e8123148666edea5c390b185881ad42cfe2..7e34c7cc3dd14b714a216af693416a9d0489f402 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -96,6 +96,10 @@ let g:haskell_backpack = 1                " to enable highlighting of backpack k
 
 Plug 'aklt/plantuml-syntax'
 
+Plug 'mtth/scratch.vim'  " {{{2
+  let g:scratch_no_mappings = 1
+"}}}
+
 call plug#end()
 
 filetype plugin indent on
@@ -567,7 +571,13 @@ autocmd BufReadPost fugitive://* set bufhidden=delete
 
 nnoremap <silent> <leader>gs :Git<CR>
 nnoremap <silent> <leader>gd :Gdiffsplit<CR>
-nnoremap <silent> <leader>gc :tab G commit -v<CR>
+nnoremap <silent> <leader>gc :echohl WarningMsg \| echo "use \<leader>gcc instead" \| echohl None<CR> 
+nnoremap <silent> <leader>gcc :tab G commit -v<CR>
+nnoremap <silent> <leader>gca :tab G commit -v --amend<CR>
+nnoremap          <leader>gcf :tab G commit -v --fixup=
+nnoremap <silent> <leader>gp :echohl WarningMsg \| echo "use \<leader>gpp instead" \| echohl None<CR> 
+nnoremap <silent> <leader>gpp :G push<CR>
+nnoremap <silent> <leader>gpf :G push --force-with-lease<CR>
 nnoremap <silent> <leader>ga :Gwrite<cr>
 nnoremap <silent> <leader>gb :G blame<cr>