From 4189bdb580743a92f0e81d0ba9359a1c3b253a3c Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 29 Sep 2020 20:31:08 -0400 Subject: [PATCH] Don't override user :G Closes https://github.com/tpope/vim-fugitive/issues/1607 --- plugin/fugitive.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 2b9e4d90ff..edb81e5e73 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -420,7 +420,9 @@ let s:addr_other = has('patch-8.1.560') ? '-addr=other' : '' let s:addr_tabs = has('patch-7.4.542') ? '-addr=tabs' : '' let s:addr_wins = has('patch-7.4.542') ? '-addr=windows' : '' -command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete G exe fugitive#Command(, , +"", 0, "", ) +if exists(':G') != 2 + command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete G exe fugitive#Command(, , +"", 0, "", ) +endif command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#Complete Git exe fugitive#Command(, , +"", 0, "", ) if exists(':Gstatus') !=# 2