Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Efficiently manage the differences between two files using vim.

Project Description

Opens two files in vimdiff and 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.

Usage

vdiff [options] <file1> <file2> [<file3> [<file4>]]

Options

-v, --vim Use vim (rather than default).
-g, --gvim Use gvim (rather than default).
-f, --force Edit the files even if they are the same.
-q, --quiet Issue only error messages.
-h, --help Print this helpful message.

Relevant Key Mappings

Ctrl-j Move down to next difference
Ctrl-k Move up to previous difference
Ctrl-o Obtain difference
Ctrl-p Push difference
{ Update file1 to match file2
} Update file2 to match file1
S Save any changes in all files and quit
Q Quit without saving any file
= Make all panes the same size and rotate between them
+ Update differences

Defaults

Defaults 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 = True

These values also happen to be the default defaults.

As a Package

You can also use vdiff in your own Python programs. To do so, you would do something like the following:

from inform import Error
from vdiff import Vdiff

vdiff = Vdiff(lfile, rfile)

try:
    vdiff.edit()
except KeyboardInterrupt:
    vdiff.cleanup()
except Error as err:
    err.report()

Installation

Runs only on Unix systems. Requires Python 3.5 or later. Install by running ‘./install’ or ‘pip3 install vdiff’.

Release History

Release History

This version
History Node

2.4.0

History Node

2.3.6

History Node

2.3.5

History Node

2.3.4

History Node

2.3.3

History Node

2.3.2

History Node

2.3.1

History Node

2.3.0

History Node

2.2.0

History Node

2.1.5

History Node

2.1.4

History Node

2.1.3

History Node

2.1.2

History Node

2.1.1

History Node

2.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
vdiff-2.4.0.tar.gz (5.1 kB) Copy SHA256 Checksum SHA256 Source Apr 24, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting