|
|
|
|
|
by Watabou
3332 days ago
|
|
Did you try tig [1]? I prefer the command line solution to shoving complicated things and UI (which fugitive is -- I could barely remmeber all the features I had and like you, I only really ever used the :Gblame command the most) into vim. I prefer to have vim be lightweight and let other tools do their job (i.e the UNIX way). I don't use fugitive now but I do make full use of tig. In my .vimrc I have: nnoremap <leader>gb :echo system("git rev-parse --abbrev-ref @ <bar> tr -d '\n'")<CR>
nnoremap <leader>go :silent !tig<CR>:silent redraw!<CR>
nnoremap <leader>gB :silent !tig blame % +<C-r>=expand(line('.'))<CR><CR>:silent redraw!<CR>
The above solution leaves vim purely for editing, and tig for doing the actual git presentation.Asciinema demo of tig blame: https://asciinema.org/a/4as7ujt8cpnpyx0doyrervatl Just like fugitive, I can travel back and forth through history. And if I hit q, I'm back in vim. [1]: https://github.com/jonas/tig |
|