Ⅰ. 插件描述
Show git branch listⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'takahirojin/gbr-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'takahirojin/gbr-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'takahirojin/gbr-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/takahirojin/gbr.vim
Ⅳ. 文档说明
# gbr.vim
Show git branch list
Usage:
- Run
:Gbrto show your local branch list. - Press
Enterto switch branch which you choose. - Press
cto create a new branch. - Press
ccto create and switch a new branch. - Press
Cto create and switch a new branch from refs/heads/branch-name - Press
mto rename a branch. as same as "-m" options - Press
dto delete a branch. as same as "-d" options - Press
Dto delete a branch. as same as "-D" options - Press
qto close branch list. - Run
:GbrTruncateBranchto delete branch exclude current branch
Tips:
- display current branch on top of the list
let g:gbr_current_branch_top = 1
- set maximum window height
let g:gbr_window_height = 20
- set exclude branches when using GbrTruncateBranch command
let g:gbr_exclusion_branch = ['foo', 'bar']