Ⅰ. 插件描述
Git add, git commit, git pull, git push all in one command, without leaving vim.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'peterhurford/send-vim-if-this-was-a-movie'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'peterhurford/send-vim-if-this-was-a-movie'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'peterhurford/send-vim-if-this-was-a-movie'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/peterhurford/send.vim
Ⅳ. 文档说明
send.vim Git add, git commit, git pull, git push all in one command, without leaving vim.
Typing :Send <commit message> in the vim ex command will automatically run the following commands in your shell:
git add (everything in current git repository)
git commit -m '<commit message>'
git pull origin (the current git branch)
git push origin (the current git branch)You can also type just :Send to commit without writing a commit message.
Installation
You've done that, you can install this plugin using pathogen.vim with the following commands:
cd ~/.vim/bundle
git clone https://github.com/peterhurford/send.vimChange Defaults
You can change :Send to another command by adding let g:GitSendPrefix = '<my command>' to your .vimrc. I like :S (let g:GitSendPrefix = 'S').
You also can supress the output given by send with let g:GitSendSupressOutput = 1 in your .vimrc.