Ⅰ. 插件描述
A git commit browser in VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'junegunn/gv-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'junegunn/gv-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'junegunn/gv-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/junegunn/gv.vim
Ⅳ. 文档说明
gv.vim
A git commit browser.
gitv is nice. But I needed a faster, and
possibly simpler alternative that I can use with a project with thousands of
commits.
Installation
Requires fugitive.
Using vim-plug:
Plug 'tpope/vim-fugitive'
Plug 'junegunn/gv.vim'
Usage
Commands
:GV
to open commit browser- You can pass
git log
options to the command, e.g.:GV -S foobar
.
- You can pass
:GV!
will only list commits that affected the current file:GV?
fills the location list with the revisions of the current file
:GV
or :GV?
can be used in visual mode to track the changes in the
selected lines.
Mappings
o
or<cr>
on a commit to display the content of ito
or<cr>
on commits to display the diff in the rangeO
opens a new tab insteadgb
for:Gbrowse
]]
and[[
to move between commits.
to start command-line with:Git [CURSOR] SHA
à la fugitiveq
orgq
to close
Customization
¯\_(ツ)_/¯