nvim: after/plugin/fugitive: Make diff & difftool usage painless

This commit is contained in:
Sanchayan Maity 2022-01-31 13:44:26 +05:30
parent 73ceafcda2
commit 60478a59b0
1 changed files with 5 additions and 2 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 :Ghdiffsplit!<CR>
nnoremap <Leader>gD :Gvdiffsplit!<CR>
nnoremap <Leader>gd :Gdiff<CR>
nnoremap <Leader>gD :Gdifftool<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,3 +40,6 @@ 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