Ⅰ. 插件描述
flayouts.vim - Layouts for FugitiveⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'vrybas/vim-flayouts'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'vrybas/vim-flayouts'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'vrybas/vim-flayouts'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vrybas/vim-flayouts
Ⅳ. 文档说明
# flayouts.vim - Layouts for Fugitive
Flayouts.vim aims to ease work with Fugitive by providing window
layouts for certain operations, such as:
- Commit
- Pull Request review
- Conflict Resolution
:GlstatusTab - a "Commit" layout.
- Run
:GlstatusTab(or:Glc) - Review diff
- Jump to "status" window
- Press
-to add/remove files - Run
:Git diffor:Git diff --cachedin a diff window to update
diff - Press
Cin "status" window to enter a commit message - Run
:Glcommit(or:Glcagain) to commit - Run
:Glabortto cancel commit and close tab

:GlpullRequestSummaryTab - a "Pull Request Review" layout.
- Run
:GlpullRequestSummaryTab origin/masteror:GlpullRequestCommitsTab origin/master - Review diff
- Run
:GlopenFromDiffwith your cursor on diff chunk to open corresponding file and line - Run
:Gblameto show "git-blame" of current file - Press
oon commit SHA to open commit where chunk was added.

:GlresolveConflictTab - a "Resolve Conflict" layout.
- Run
:GlresolveConflictTab - Compare "HEAD"(ours) versions and "MERGE"(theirs) version
- Resolve conflict on "both modified" version
- Run
:Glwriteon "both modified" version to add file to index and
close tab

All available commands and their description can be found here:
https://github.com/vrybas/vim-flayouts/blob/master/doc/flayouts.txt
Installation
Bundle 'tpope/vim-fugitive'
Bundle 'vrybas/vim-flayouts'License
Copyright (c) Vladimir Rybas.