gdiff - Graphical file difference
%gdiff-com - Gdiff diff(1) command line
gdiff "version1" "version2"
%gdiff-com "string"; Default is "diff -c -w"
gdiff is a macro utility that facilitates the merging of two files (typically with different modification revisions). The changes between the revisions are hilighted with color, allowing modification regions and lines to be selected for the generation of a newer revision file, which might encompass selected modifications from each of the base revisions.
gdiff executes the diff(1) command with the command line set by the %gdiff-com(5) variable and the user supplied version1 and version2. The output is displayed in two buffer windows, side by side, and the differences in the lines are hilighted to show the changes. In addition the content of the two buffers is normalized such that both windows are aligned at the same line position, allowing the changes in the text to be viewed in both windows at the same time.
Whilst in gdiff view mode then both scroll bars (if visible) are locked, such that either scrolls BOTH windows at the same time. Other key commands are disabled, as are the menu interactions. The short cut keys are defined as follows:-
esc h/A-h - View the help page.
C-up - Move to previous difference
C-down - Move to next difference
left mouse button
r - Select difference version
R - Select neither version.
l - Line select current version
L - Line select neither version
g - Globally selects the current version.
G - Globally selects neither version.
C-x C-s - Save current side
C-x C-w - Save current side as
C-x k - Exit graphical diff
The hilighting within the windows is dependent upon the color scheme selected, in general the following hilights apply:-
gdiff is a macro defined in gdiff.emf, inspired by the GNU utility of the same name gdiff(1)
diff(1) must be executable on the system before gdiff can function. The diff(1) invocation must include the context difference, which annotates the differences with a +, - or ! markers. diff(1) is typically invoked with the options -c -w.
diff(1) is a standard utility on UNIX systems. For Windows 95/NT a version of GNU diff may be found at:
For MS-DOS users, a DJGPP port of GNU diff is also available on the net. A commercial version of diff is also available from MKS.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2002/01/11
Generated On: 2006/10/07