vim-min-git-status


Ⅰ. 插件描述

A minimal replacement for fugitive's Gstatus command

Ⅱ. 基本信息

创建日期:  2014-10-03
使用用户:  6
Github星:  5
插件作者:  Alex David

Ⅲ. 安装方法

使用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 CircleCI branch

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 t on a file to open it in a new tab
    • Press v on a file to open it in a new vertical split
    • Press s on a file to open it in a new horizontal split
  • 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!
  • Installation with Pathogen

    • git clone git://github.com/alexdavid/vim-min-git-status.git ~/.vim/bundle

Screenshots

GstatusGministatus
GstatusGminisatatus

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 line
  • o or Enter to open the file
  • t to open the file in a new tab
  • v to open the file in a new vertical split
  • s to open the file in a new horizontal split
  • p to add --patch or reset --patch the file

    • Note: If there are changes in the index and working tree this will add --patch
  • git to get the file path in vim's command line prefixed by !git.

    • Your cursor will be between !git and the file path.
    • For example, to checkout a file, you can position your cursor over a changed file and just type git then checkout<Enter>
  • r or R to refresh
  • cc to commit
  • q to quit

添加新评论