Ⅰ. 插件描述
A Vim plugin for creating better diffs (sometimes)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/enhanceddiff'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/enhanceddiff'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/enhanceddiff'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/EnhancedDiff
Ⅳ. 文档说明
This plugin allows to make use of the Patience diff algorithm for generating diffs to use with Vim. This needs the git command line tool available.
You can also customize you setup to use any other tool to generated diffs (e.g. mercurial) Read the help on how to configure the plugin accordingly.
See the screenshots at https://github.com/chrisbra/vim-diff-enhanced
This plugin defines the following Ex commands:
:PatienceDiff - Use the Patience Diff algorithm for the next diff mode
:CustomDiff <algorithm> - Use <algorithm> to generate the diff. Use any of
myers
default
histogram
patience
After changing the algorithm, you need to run :diffupdate if you are in diff mode to regenerate the diff.
Note: Those 2 commands use internally git to generate the diffs. Make sure you have at least git version 1.8.2 installed.
:DisableEnhancedDiff - Disable plugin (and use default Vim diff capabilities).