nvim: after/plugin/fugitive: Make diff & difftool usage painless
This commit is contained in:
parent
73ceafcda2
commit
60478a59b0
1 changed files with 5 additions and 2 deletions
|
@ -5,8 +5,8 @@ nnoremap <Leader>gb :Git branch -a<CR>
|
||||||
nnoremap <Leader>gB :Git branch<SPACE>
|
nnoremap <Leader>gB :Git branch<SPACE>
|
||||||
nnoremap <Leader>gc :Git checkout -b<SPACE>
|
nnoremap <Leader>gc :Git checkout -b<SPACE>
|
||||||
nnoremap <Leader>gC :Git checkout<SPACE>
|
nnoremap <Leader>gC :Git checkout<SPACE>
|
||||||
nnoremap <Leader>gd :Ghdiffsplit!<CR>
|
nnoremap <Leader>gd :Gdiff<CR>
|
||||||
nnoremap <Leader>gD :Gvdiffsplit!<CR>
|
nnoremap <Leader>gD :Gdifftool<CR>
|
||||||
nnoremap <Leader>ge :sp<CR>:Gedit HEAD~:%<Left><Left>
|
nnoremap <Leader>ge :sp<CR>:Gedit HEAD~:%<Left><Left>
|
||||||
nnoremap <Leader>gE :sp<CR>:Gedit :%:p<Left><Left><Left><Left>
|
nnoremap <Leader>gE :sp<CR>:Gedit :%:p<Left><Left><Left><Left>
|
||||||
nnoremap <Leader>gf :Git fetch --all --tags -f<CR>
|
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 FileType fugitive,fugitiveblame nnoremap <buffer><silent> q :bwipeout!<CR>
|
||||||
autocmd BufReadPost fugitive:// setlocal bufhidden=wipe
|
autocmd BufReadPost fugitive:// setlocal bufhidden=wipe
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
command! Gdiff tabnew % | Gvdiffsplit!
|
||||||
|
command! Gdifftool tabedit +set\ buftype=nofile\ bufhidden=wipe | Git difftool
|
||||||
|
|
Loading…
Reference in a new issue