nvim: after/plugin/fugitive: Improve the diff commands

There was no need for the tab command shenanigans.
This commit is contained in:
Sanchayan Maity 2022-02-10 09:50:16 +05:30
parent 3c62e9f330
commit 316c17ad13
1 changed files with 2 additions and 5 deletions

View File

@ -5,8 +5,8 @@ nnoremap <Leader>gb :Git branch -a<CR>
nnoremap <Leader>gB :Git branch<SPACE>
nnoremap <Leader>gc :Git checkout -b<SPACE>
nnoremap <Leader>gC :Git checkout<SPACE>
nnoremap <Leader>gd :Gdiff<CR>
nnoremap <Leader>gD :Gdifftool<CR>
nnoremap <Leader>gd :Gtabedit<Bar>Git diff %<Bar>only<CR>
nnoremap <Leader>gD :Gtabedit<Bar>Git diff<Bar>only<CR>
nnoremap <Leader>ge :sp<CR>:Gedit HEAD~:%<Left><Left>
nnoremap <Leader>gE :sp<CR>:Gedit :%:p<Left><Left><Left><Left>
nnoremap <Leader>gf :Git fetch --all --tags -f<CR>
@ -40,6 +40,3 @@ augroup custom_fugitive
autocmd FileType fugitive,fugitiveblame nnoremap <buffer><silent> q :bwipeout!<CR>
autocmd BufReadPost fugitive:// setlocal bufhidden=wipe
augroup END
command! Gdiff tabnew % | Gvdiffsplit!
command! Gdifftool tabedit +set\ buftype=nofile\ bufhidden=wipe | Git difftool