From b3b907c40819894eeb7f94cd9d1dd1291408464b Mon Sep 17 00:00:00 2001 From: Dmitry Chumak Date: Thu, 8 Sep 2022 12:17:14 +0300 Subject: [PATCH] [vim] git push/pull commands through a vim internal pane --- vim/vimrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index b9fdeb4..5dd53ae 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -98,8 +98,12 @@ nnoremap gu :GitGutterUndoHunk " undo git change under the line " Magit plugin config " nnoremap gs :Magit| " git status -nnoremap gp :! git push| " git Push -nnoremap gP :! git pull| " git Pull +function GitPullPush(cmd) + echo system('git '.a:cmd) + " redraw! +endfunction +nnoremap gp :call GitPullPush("push")| " git Push +nnoremap gP :call GitPullPush("pull")| " git Pull " " NERDTree plugin config