(no title)
ackyshake | 4 years ago
These days, I just use git in a tmux split rather than trying to force vim to show some arbitrary git UI. For a nice interactive git UI, I use tig[1]. Tig is essentially like fugitive/magic insofar as it allows me to interactively view a nice graphical log, stage/commit, traverse a file's historical blame, etc. It's a nicer UI compared to something like `gitk`.
I have these mappings in my `~/.vim/vimrc` for git/tig functionalities:
nnoremap gb :<C-u>echo system('git rev-parse --abbrev-ref @ <bar> tr -d "\n"')<CR>
nnoremap gB :<C-u>silent !tig blame <C-r>=shellescape(expand("%"))<CR> +<C-r>=expand(line('.'))<CR><CR>:silent redraw!<CR>
nnoremap gO :<C-u>silent !tig<CR>:silent redraw!<CR>
[1]: https://github.com/tpope/vim-fugitive
rjzzleep|4 years ago
I've been using `!tig` forever. For some reason it was convenient enough for me to never turn it into a mapping. I feel like `tig` damaged me in the sense that using tig and then pressing `S` is my usual workflow, so I just can't get used to either fugitive or magit.
Thanks for these mappings
sodapopcan|4 years ago
ackyshake|4 years ago
That said though, I actually prefer using the shell to stage and commit stuff. I think I'm way faster when I'm on the shell performing those actions than in either tig or fugitive.
imbnwa|4 years ago
probotect0r|4 years ago
lowski_|4 years ago
Eventually I moved to https://github.com/codeindulgence/vim-tig which does the same via `:Tig` and `:Tig!`.
I added those mappings to achieve something similar:
Thank you for inspiration! Tig FTW!cloverr20|4 years ago
ackyshake|4 years ago
iberianpig|4 years ago