Ⅰ. 插件描述
A minimal replacement for fugitive's Gstatus commandⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'alexdavid/vim-min-git-status'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'alexdavid/vim-min-git-status'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'alexdavid/vim-min-git-status'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/alexdavid/vim-min-git-status
Ⅳ. 文档说明
vim-min-git-status 
A minimal replacement for fugitive's Gstatus command. Uses git status --short to render status which keeps things concise and clean.
What are the advantages over Gstatus?
Space conscious (See screenshots below)
- Same information conveyed in fewer lines
- Status window automatically resizes to fit its content
More file shortcuts
- Press
ton a file to open it in a new tab - Press
von a file to open it in a new vertical split - Press
son a file to open it in a new horizontal split
- Press
Files don't move or re-order themselves when staging / unstaging
- Files always remain in alphabetical order instead of being grouped by their status in the git index
Installation
Installation with Vundle
- Add
Bundle 'alexdavid/vim-min-git-status'to your vimrc - run
vim +BundleInstall!
- Add
Installation with Pathogen
git clone git://github.com/alexdavid/vim-min-git-status.git ~/.vim/bundle
Screenshots
| Gstatus | Gministatus |
|---|---|
![]() | ![]() |
Usage
Open the status window with :Gministatus, then position cursor over files and type:
-to Stage/unstage files- Note: If there are changes in the index and working tree this will stage the file
.to get the file path in vim's command lineoorEnterto open the filetto open the file in a new tabvto open the file in a new vertical splitsto open the file in a new horizontal splitptoadd --patchorreset --patchthe file- Note: If there are changes in the index and working tree this will
add --patch
- Note: If there are changes in the index and working tree this will
gitto get the file path in vim's command line prefixed by!git.- Your cursor will be between
!gitand the file path. - For example, to checkout a file, you can position your cursor over a changed file and just type
gitthencheckout<Enter>
- Your cursor will be between
rorRto refreshccto commitqto quit

