Ⅰ. 插件描述
Display Mercurial revision info in the Vim statusline.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/hgrev'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/hgrev'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/hgrev'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/hgrev
Ⅳ. 文档说明
HGRev is a small plugin that can find the current buffer's revision ID from a Mercurial (http://mercurial.selenic.com/) repository.
It is intended for use in the Vim statusline - here's an example to enable it:
set statusline=[r%{HGRev()}]
HGRev exports the "HGRev()" function (for use in the statusline), and
a command called ":RefreshMercurialRev", which you can use to manually
update the revision information for the current buffer. If you've added
HGRev() to your statusline, you'll see the file revision, branch, tags,
and file status reflected -- if you used the statusline example above,
you should see something like this:
[r192+ default tip M]
The information displayed can be easily customized, and HGRev can also
automatically update the status line on file changes. (This behavior is
disabled by default -- see the documentation for details.)
Once installed, HGRev has built-in help. Access it via ":help HGRev".