From 316c17ad132b848349c2cfe10a747470540b673c Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 10 Feb 2022 09:50:16 +0530 Subject: [PATCH] nvim: after/plugin/fugitive: Improve the diff commands There was no need for the tab command shenanigans. --- nvim/.config/nvim/after/plugin/fugitive.vim | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nvim/.config/nvim/after/plugin/fugitive.vim b/nvim/.config/nvim/after/plugin/fugitive.vim index d60deb4..402c0b8 100644 --- a/nvim/.config/nvim/after/plugin/fugitive.vim +++ b/nvim/.config/nvim/after/plugin/fugitive.vim @@ -5,8 +5,8 @@ nnoremap gb :Git branch -a nnoremap gB :Git branch nnoremap gc :Git checkout -b nnoremap gC :Git checkout -nnoremap gd :Gdiff -nnoremap gD :Gdifftool +nnoremap gd :GtabeditGit diff %only +nnoremap gD :GtabeditGit diffonly nnoremap ge :sp:Gedit HEAD~:% nnoremap gE :sp:Gedit :%:p nnoremap gf :Git fetch --all --tags -f @@ -40,6 +40,3 @@ augroup custom_fugitive autocmd FileType fugitive,fugitiveblame nnoremap q :bwipeout! autocmd BufReadPost fugitive:// setlocal bufhidden=wipe augroup END - -command! Gdiff tabnew % | Gvdiffsplit! -command! Gdifftool tabedit +set\ buftype=nofile\ bufhidden=wipe | Git difftool