A plugin for using unified diff in vimdiff
MIT License
Vim 8.1.0360 introduce algorithm:{text}
to diffopt
and natively supports the following algorithms
So that if you use this plugin to use one of the above algorithm, the plugin is no longer required and use setting like below:
set diffopt& diffopt+=algorithm:histogram,indent-heuristic
See :help diffopt
for detail.
This plugin is a plugin to use an external diff program which only support
unified-diff in vimdiff
.
In default, it uses git diff --histogram
so that installing this plugin
automatically improve your vimdiff
quality.
For example
It will be turn into
by this plugin.
Inspired by http://qiita.com/takaakikasai/items/3d4f8a4867364a46dfa3 and written in pure vimscript.
NeoBundle 'lambdalisue/vim-unified-diff'
Plug 'lambdalisue/vim-unified-diff'
Once users install this plugin, it automatically configures diffexpr
.
To disable it, assign 0 to g:unified_diff_enabled
variable.