This project is a minimal vim plugin for working with git; it first did git blame
, later added support for git grep
, git log --graph
, git ls-files
, git diff
, git log --name-status --find-renames
, git status
commands, it also allows you to change the current branch and shows the current branch in the status line (optionally).
It's not too overengineered, so there is a chance that it will work for your installation too.
For more information, see help text
This plugin is currently not supporting merges/rebases, as I am used to doing these from the command line. You have got a different plugin, vim fugitive, if you need to do merge/rebase from vim.
This plugin is part of my work environment, this project publishes it separately as a neat plugin.
Here is a presentation of the plugin on youtube
To install this plugin, run the following commands.
mkdir -p ~/.vim/pack/vendor/start/gitblame; git clone --depth 1 https://github.com/MoserMichael/gitblame ~/.vim/pack/vendor/start/gitblame
or
mkdir -p ~/.vim/pack/vendor/start/gitblame git clone --depth 1 https://github.com/MoserMichael/gitblame ~/.vim/pack/vendor/start/gitblame
To install from the downloaded zip file:
mkdir -p ~/.vim/pack/vendor/start/gitblame; unzip gitblame.zip -d ~/.vim/pack/vendor/start/gitblame
To generate the help text run the following vim command:
:helptags ALL
After that you can view the help file of plugin via vim command:
:help gitblame
Also see this script on vim.org
This plugin uses Redir by Romain Lafourcade https://gist.github.com/romainl/eae0a260ab9c135390c30cd370c20cd7
Showing the current git branch in the status line doesn't always work. Sometimes the command to show the git branch is running too slow, in this case you will see nasty symbols while moving the cursor around the screen. I saw this happening on Linux running under WSL, on Windows (didn't see it on Linux without WSL or on the Mac)