Git Blame is a Vim plugin that integrates git blame functionality directly into Vim, allowing you to see who last modified each line in the current file.
- Displays git blame information for the current line in a Vim buffer.
Once installed, you can use the :GitBlame command to display the git blame information for the current line in the buffer.
:GitBlameMap the function to a shortcut in your vimrc for quick peak at the git blame
vim:
nmap <silent><Leader>g :GitBlame<CR>neovim:
vim.api.nvim_set_keymap('n', '<Leader>g', ':GitBlame<CR>', { silent = true })Using Vundle
-
Add the following line to your
.vimrc:Plugin 'darthfork/git-blame.vim'
-
Install the plugin by running:
:PluginInstall
Using Pathogen
-
Clone the repository into your
.vim/bundledirectory:git clone https://github.com/darthfork/git-blame.vim ~/.vim/bundle/git-blame.vim
Using vim-plug
-
Add the following line to your
.vimrc:Plug 'darthfork/git-blame.vim' -
Install the plugin by running:
:PlugInstall
-
Clone the repository:
git clone https://github.com/darthfork/git-blame.vim ~/.vim/pack/plugins/start/git-blame.vim -
Restart Vim.
