Ⅰ. 插件描述
A git blame plugin for neovim inspired by VS Code's GitLens pluginⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'apzelos/blamer-nvim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'apzelos/blamer-nvim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'apzelos/blamer-nvim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/apzelos/blamer.nvim
Ⅳ. 文档说明
# blamer.nvim
A git blame plugin for (neo)vim inspired by VS Code's GitLens plugin.

Note: For Vim, a popup feature is required.
Installation
vim-plug
- Add the following line to your
init.vim:
call plug#begin('~/.local/share/nvim/plugged')
...
Plug 'APZelos/blamer.nvim'
...
call plug#end()- Run
:PlugInstall.
Configuration
Enabled
Enables blamer on (neo)vim startup.
You can toggle blamer on/off with the :BlamerToggle command.
If the current directory is not a git repository the blamer will be automatically disabled.
Default: 0
let g:blamer_enabled = 1Delay
The delay in milliseconds for the blame message to show. Setting this too low may cause performance issues.
Default: 1000
let g:blamer_delay = 500Show in visual modes
Enables / disables blamer in visual modes.
Default: 1
let g:blamer_show_in_visual_modes = 0Prefix
The prefix that will be added to the template.
Default: ' '
let g:blamer_prefix = ' > 'Template
The template for the blame message that will be shown.
Default: '<committer>, <committer-time> • <summary>'
Available options: <author>, <author-mail>, <author-time>, <committer>, <committer-mail>, <committer-time>, <summary>, <commit-short>, <commit-long>.
let g:blamer_template = '<committer> <summary>'Date format
The format of the date fields. (<author-time>, <committer-time>)
Default: '%d/%m/%y %H:%M'
let g:blamer_date_format = '%d/%m/%y'Highlight
The color of the blame message.
Default: link Blamer Comment
highlight Blamer guifg=lightgreyAuthor
License
This software is released under the MIT License.