git-vim


Ⅰ. 插件描述

My vim files for Git

Ⅱ. 基本信息

创建日期:  2008-04-27
使用用户:  338
Github星:  589
插件作者:  Hironao OTSUBO

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'motemen/git-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'motemen/git-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'motemen/git-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/motemen/git-vim

Ⅳ. 文档说明

= git.vim

This project is no longer maintained. You may want to use {tpope/vim-fugitive}[https://github.com/tpope/vim-fugitive].

== Introduction
Git-vim provides:

  • Plugin files for calling git functions from inside Vim
  • Syntax files for git displays

== Commands
[:GitAdd <file>] git-add <file> or current file if not specified.
[:GitCommit <args>] git-commit.
[:GitStatus] Show git-status of current file or repository.
[:GitLog] Show git-log of current file or repository.
[:GitCheckout <args>] git-checkout. Completes git commits.
[:GitDiff <args>] git-diff. Completes git commits.
[:GitPull <args>] git-pull.
[:GitPullRebase] git-pull --rebase.
[:GitPush <args>] git-push. Defaults to +git push origin <current-branch>+.
[:GitCatFile <args>] git-cat-file.
[:GitBlame <args>] git-blame.
[:Git <args>] Does any git command.
[:GitVimDiffMerge] Experimental. Call this command on unmerged file to enter vimdiff mode.
[:GitVimDiffMergeDone] Call this command after merging.

== Keymaps
[<Leader>gd] :GitDiff
[<Leader>gD] :GitDiff --cached
[<Leader>gs] :GitStatus
[<Leader>gl] :GitLog
[<Leader>ga] :GitAdd
[<Leader>gA] :GitAdd <cfile>
[<Leader>gc] :GitCommit
[<Leader>gb] :GitBlame

=== In git-status buffer
[<Enter>] :GitAdd <cfile>

== License
The MIT License

添加新评论