things I like: vim-fugitive + vim-rhubarb + GBrowse
There are many things any git plugin for your editor will give you. For me, the most important feature I need to feel productive is any means of opening a particular file in github or any other hosted SCM. I have seen extended git[hub] metadata directly visible at the editor (looking at you vscode) but that feels too much in your face.
Like it or not, your work directory lives on this particular platform, so sooner or later you will have to interact with it. For vim, that’s exactly what :GBrowse
is, provided by vim-fugitive and vim-rhubarb.
:GBrowse Open the current file, blob, tree, commit, or tag
in your browser at the upstream hosting provider.
Upstream providers can be added by installing an
appropriate Vim plugin. For example, GitHub can be
supported by installing rhubarb.vim, available at
<https://github.com/tpope/vim-rhubarb>.
:GBrowse {object} Like :GBrowse, but for a given |fugitive-object|.
:{range}GBrowse [args] Appends an anchor to the URL that emphasizes the
selected lines. This also forces the URL to include a
commit rather than a branch name so it remains valid
if the file changes. You can give a range of "0" to
force this behavior without including an anchor.
:GBrowse [...]@{remote} Force using the given remote rather than the remote
for the current branch. The remote is used to
determine which upstream repository to link to.
:GBrowse {url} Open an arbitrary URL in your browser.
:[range]GBrowse! [args] Like :GBrowse, but put the URL on the clipboard rather
than opening it.
I have this on my .vimrc
. I prefix some macros with ,
and a theme g[it]
. These macros work both on normal, and visual mode for ranges.
map ,gg :GBrowse<cr>
map ,gb :Git blame<cr>
You won’t try it unless there’s some heavy rich and colorful animations flashing on your screen.