Ⅰ. 插件描述
Enable quilt usage in vimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/quilt'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/quilt'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/quilt'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/quilt
Ⅳ. 文档说明
(from the help of the plugin: :help quilt-intro ) :
Quilt is a project initiated by Andrew Morton to work with patches sent on the
LKML. It is quite stable now, and really usefull to deal with stacked patches.
First of all, before using this plugin, you must install quilt on your
station, for, under debian distribution, type in a command shell:
aptitude install quilt
Now that you have your station setuped, let's speak a little about Quilt
itself, more information can be found in man quilt shell command.
The idea behind quilt is that you work on patches, not on sources directly, so
all your productions are patches. You create a patch to track your
modifications and send this patch to a work group so they can valiadate/accept
or integrate your modifications.
Now you need a tool to help you maintain your patches, and that's exacltly
what quilt does. Quilt let you apply a patch, modify your files (and thus the
patch), unapply the patch. But it also allows you to do that on several
patches at a time (one patch applied after the other ...) that's what we call
the stacked patches. (or the patch stack).
You can go to a level on the patch stack, modify the patch, and come back to
another patch stack level.
This plugin helps you handle all those boring operations with simple vim
commands ;)
To sum up the workflow :
|:QuiltSetup| <patchdir>
then:
|:QuiltNew| <patchname>
... open a file ...
|:QuiltAdd|
... work on the file ...
... save your modifiations ...
|:QuiltRefresh|
and so on ...
:help quilt-usage