Package: vdiff
Author:Ken KundertVersion:2.6.0Released:2021-08-25Opens two files invimdiffand provides single-stroke key mappings to make
moving differences between two files efficient. Up to two additional files may
be opened at the same time, but these are generally used for reference purposes.Usagevdiff[options] <file1> <file2> [<file3> [<file4>]]Options-v,--vimUse vim (rather than default).-g,--gvimUse gvim (rather than default).-f,--forceEdit the files even if they are the same.-q,--quietIssue only error messages.-h,--helpPrint this helpful message.Relevant Key MappingsCtrl-jMove down to next differenceCtrl-kMove up to previous differenceCtrl-oObtain differenceCtrl-pPush difference{Update file1 to match file2}Update file2 to match file1SSave any changes in all files and quitQQuit without saving any file=Make all panes the same size and rotate between them+Update differencesWhen comparing 3 or 4 files, you must prepend the buffer number to the push or
obtain command. The buffers are numbered from the left to the right starting
with 1.  For example, to obtain the difference from buffer 3, move to that
difference and type ‘3 Ctrl-o’.DefaultsDefaults will be read from ~/.config/vdiff/config if it exists. This is a Python
file that is evaluated to determine the value of three variables: vimdiff,
gvimdiff, and gui.  The first two are the strings used to invoke vimdiff and
gvimdiff. The third is a boolean that indicates which should be the default. If
gui is true, gvimdiff is used by default, otherwise vimdiff is the default. An
example file might contain:vimdiff = 'gvimdiff -v'
gvimdiff = 'gvimdiff -f'
gui = TrueThese values also happen to be the default defaults.As a PackageYou can also usevdiffin your own Python programs. To do so, you would do
something like the following:from inform import display, Error
from vdiff import Vdiff

with Vdiff(l_filename, r_filename) as vdiff:
    try:
        if vdiff.differ():
            vdiff.edit()
        else:
            display('%s and %s are the same.' % (l_filename, r_filename))
    except KeyboardInterrupt:
        pass
    except Error as err:
        err.report()You can also usevdiffto compare string:from inform import display, Error
from vdiff import Vdiff

with Vdiff(l_identifier, r_identifier) as vdiff:
    try:
        if vdiff.differ():
            vdiff.compare_strings(l_string, r_string):
        else:
            display('%s and %s are the same.' % (l_identifier, r_identifier))
    except Error as err:
        err.report()Using Vdiff with MercurialTo use Vdiff withMercurial, merge the
following entries into your ~/.hgrc file:[ui]
merge = vdiff

[extensions]
extdiff =

[extdiff]
cmd.vdiff = vdiff
opts.vimdiff = -gThese will result in Vdiff being used whenever a merge conflict occurs. It also
allows you to use ‘hg vdiff’ to view differences between versions.Using Vdiff with GitTo use Vdiff withGit, merge the following entries
into your ~/.gitconfig file:[merge]
    tool = vdiff
[mergetool "vdiff"]
    cmd = vdiff_executable $LOCAL $REMOTEThese will result in Vdiff being used whenever a merge conflict occurs.Using Vdiff with EmborgTo use Vdiff withEmborg, merge the
following entries into your ~/.config/emborg/settings file:manage_diffs_cmd = "vdiff -g"This results in Vdiff being used for interactive compare operations.InstallationRuns only on Unix systems.  Requires Python 3.6 or later.
Install by running ‘./install’ or ‘pip3 install vdiff’.