From df48553a841408671035c579d2124a18f23f83bc Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 14 Jul 2019 00:01:48 +0200 Subject: [PATCH] [ADD][VIM] Git commit, push, pull, merge mappings I forgot to save the commit mapping last time... I also added mapping to automatically write the push, pull, and merge commands of vim-fugitive. They all populate the quick-fix list with their output. --- vim/.vimrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vim/.vimrc b/vim/.vimrc index 01a69f5..b7b28b2 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -244,12 +244,20 @@ xnoremap do :diffget nnoremap ga :Git add %:p " Open status window nnoremap gs :Gstatus -" Open diff view of current buffer: the right/down window is the new version +" Open diff view of current buffer: the up/left window is the current index nnoremap gd :Gdiffsplit! " Use git-mv and rename the buffer, backspace and add '!' to use the '-f' flag nnoremap gm :Gmove " Open a buffer to the left with blame information nnoremap gb :Gblame +" Commit staged changes, open a new tab just for it +nnoremap gc :Gcommit -v -q +" Invoke git-push with arguments, populate quick-fix list +nnoremap gp :Gpush +" Invoke git-pull with arguments, populate quick-fix list +nnoremap gl :Gpull +" Invoke git-merge with arguments, populate quick-fix list +nnoremap gl :Gmerge """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Status line