sponsor Vim development Vim logo Vim Book Ad

diffchar.vim : Highlight the exact differences, based on characters and words

 script karma  Rating 68/24, Downloaded by 2610    Comments, bugs, improvements  Vim wiki

created by
Rick Howe
 
script type
utility
 
description
This plugin has been developed in order to make diff mode more useful. Vim highlights all the text in between the first and last different characters on a changed line. But this plugin will find the exact differences between them, character by character - so called DiffChar.

For example, in diff mode: ( [DiffText], <DiffAdd> )

    (window A) The [quick brown fox jumps over the lazy] dog.
    (window B) The [lazy fox jumps over the quick brown] dog.

this plugin will exactly show the changed and added units:

    (window A) The [quick] <brown >fox jumps over the [lazy] dog.
    (window B) The [lazy] fox jumps over the [quick] <brown >dog.

For details and demo samples, please visit the following git repository: https://github.com/rickhowe/diffchar.vim
 
install details
Install 'rickhowe/diffchar.vim' by using your plugin manager. Or manually unzip and copy all folders in your ~/.vim or ~/vimfiles.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
diffchar7.01.zip 7.01 2017-09-29 7.0 Rick Howe Defined new commands to get and put each difference unit between 2 buffers.
diffchar6.9.zip 6.9 2017-08-22 7.0 Rick Howe Fixed some regressions on 6.8.
diffchar6.8.zip 6.8 2017-08-12 7.0 Rick Howe Changed to make use of an OptionSet event to detect diff mode. Fixed E788 error happened on patch 8.0.736.
diffchar6.7.zip 6.7 2017-07-14 7.0 Rick Howe Fixed some defects on the :EDChar command.
diffchar6.6.zip 6.6 2017-07-11 7.0 Rick Howe Defined a new :EDChar command to echo the line by enclosing added/deleted units in [+...+]/[-...-].
diffchar6.5.zip 6.5 2016-12-23 7.0 Rick Howe Enhanced to handle multiple diff mode windows and split windows. Fixed Some defects.
diffchar6.4.zip 6.4 2016-10-22 7.0 Rick Howe Fixed some defects.
diffchar6.3.zip 6.3 2016-10-12 7.0 Rick Howe Introduced g:DiffPairVisible to make difference pairs more visible. Fixed Some defects.
diffchar6.2.zip 6.2 2016-06-12 7.0 Rick Howe Enhanced to always keep the diffchar highlights updated while editing. Fixed some defects.
diffchar6.1.zip 6.1 2016-03-11 7.0 Rick Howe Improved a workaround for vim 7.4.682 not to disappear vim's DiffChange/DiffText highlights, and so on.
diffchar6.0.zip 6.0 2016-01-30 7.0 Rick Howe Defined a new TDChar command, changed the default value of g:DiffUnit from 'Char' to 'Word1', and more enhancements and fixes.
diffchar.vim 1.0 2014-05-02 7.0 Rick Howe Initial upload
ip used for rating: 54.166.245.10

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo