xxdiff documentation

This is the user's manual for xxdiff, version 2.0.3. The official location of xxdiff on the internet is If you're reading this page from the web, note that you can also access this document from the Help menu of xxdiff.

Table of Contents


xxdiff is a graphical file and directories comparison and merge tool. This program is an essential software development tool that can be used to

  • visualize the differences between files or directories;
  • merge files with differences, resolving conflicts and saving output to a new file or patch;
  • assist file changes reviewing and comment production (e.g. approving source code changes before they get merged into a source tree).

xxdiff doesn't itself compute the differences between files, it just displays them graphically (the rationale behind this is that you can use different tools to compute the actual diffs (for example using Rational ClearCase's cleardiff, which gives more sensible results than GNU diff in certain cases), there is a relatively standard format for difference output (POSIX diff), so it is easy and efficient to parse diff output from different programs, under the UNIX dataflow paradigm, it is common for graphical tools to be built on top of text tools. There are already many good tools to perform diffs, so there's no need to rewrite them.



xxdiff [OPTIONS] <file1> <file2> [<file3>]

You can specify either two files (two-way diff), three files (three-way diff), or two directories (directory diff).

You can also specify a mix of regular files and directories. If at least one of the paths specified on the cmdline is a regular file, all other paths that are directories will have the basename of the regular filename appended to them. For example, if you specify:

xxdiff dir1/bn1 dir2/bn2 dir3
xxdiff will be run on dir1/bn1, dir2/bn2, and dir3/bn1.

xxdiff can accept one of its inputs from stdin. You must replace the relevant filename by '-' (a dash) to instruct xxdiff to use stdin for that file, e.g.

cat file2 | sort | xxdiff file1 - file3

If all the file paths are directories, a directory diff is invoked. Note that xxdiff doesn't do three-way directory diffs.


-h, --help Show help message.
--help-html Output documentation in HTML (this is mainly used by the author to generate up-to-date web documentation).
-v, --version Show the program version and compilation options.
--no-rcfile Don't query rcfile resources (.xxdiffrc).
--list-resources Lists all the supported resources and default values.
-D, --exit-on-same If there are no differences then exit quietly with exit code of 0.
-m, --merge Automatically select regions that would end up being selected by an automatic merge.
--title1 <arg> Display 'str' instead of filename in filename label 1 (left).
--title2 <arg> Display 'str' instead of filename in filename label 2 (middle).
--title3 <arg> Display 'str' instead of filename in filename label 3 (right).
-N, --titlein <arg> Display 'str' for filename in given in stdin.
--resource <arg> Pass on string 'str' to resource parser. Resources given in this manner on the command line supersede other resource mechanisms. One can specify multiple resource settings by repeating this option.
-A, --args <arg> Pass on argument to the subordinate diff program.
--orig-xdiff Used settings as close as possible to original xdiff (for the romantics longing the old days of SGI... snif snif).
-w, --ignore-all-space Option passed to diff(1). Ignore white space when comparing lines.
-b, --ignore-space-change Option passed to diff(1). Ignore changes in amount of white space.
-i, --ignore-case Option passed to diff(1). Ignore changes in case; consider upper- and lower-case to be the same.
-r, --recursive Option passed to diff(1). This is only meaningful for directory diffs.
-a, --text Option passed to diff(1). Treat all files as text and compare them line-by-line, even if they do not appear to be text.

Note that the last few options are provided compatible with common GNU diff options that the user might want to use, as a mere convenience. Note also that xxdiff options are a superset of the original xdiff options, so that xxdiff is compatible with old SGI scripts that use xdiff. xxdiff options follow the GNU conventions for command-line options.

Using xxdiff as a short-lived application

xxdiff has not been designed with the intent of being used over multiple sets of files over the course of one execution---that is, it has been built around the idea that you would execute it once over a single set of inputs, use it, then exit, rather than to open new files again using the `file' menu features without exiting. The `file' menu features are provided as a convenience, to allow one to occasionally replace one of the files during an execution. That is the reason why you can't open xxdiff with just one file. It is just not useful that way.

General operation

This section describes general features and operation of xxdiff.

The text area

xxdiff shows up with two or three text regions that display the text of the files to compare, with color-coded blocks that indicate regions of text (lines) that have changes (specific sections contain a list and descriptions on what types of change can appear). Each of these regions of text is called a "hunk" in diff terminology (for more about this, see the GNU diff manual). The text area can be scrolled vertically and horizontally, when necessary.

Corresponding regions of text are aligned between the files. Since changed regions do not necessarily contains the same number of lines, empty alignment lines are appended to the shorter regions in order to keep the corresponding lines aligned (this is a simple way of solving the alignment problem; an alternate solution would have been to implement a smart type of scrolling with lines indicating correspondance of regions between them).

All the colors can be individually configured using the display options dialog or resources. The display dialog contains a legend of all the colors. Note that the default colors for different regions are often set to be the same to other types of lines when it is not necessary to dissociate them, to avoid visual clutter. You could however, customize every region to be of a different color, for example, perhaps you would want to have the dummy lines drawn of a special color to indicate that they are not really part of the text.

In the text area, there is a cursor that in indicates the current line of text being worked on. This cursor can be optionally hidden.

Horizontal diffs

Each of the diff hunks is normally displayed in one color, but if horizontal diffs is enabled, for each line, xxdiff find the smallest differing part of the line that differs and displays that in a different, highlighted color. This allows the user to more quickly visualize exactly what has changed between the two lines of text. No need to mention, this is highly addictive and is now enabled by default.

When computing horizontal diffs, whitespace can be optionally ignored.


xxdiff supports a subset of the emacs bindings, as well as support for most of the standard keys found on AT keyboards (PgUp, PgDown, arrow keys, Home, End).

Default bindings include:

  • Ctrl-V, Alt-V: scroll up/down;
  • Ctrl-N, Ctrl-P: move cursor one line up/down;
  • Home, End: move cursor to beginning/end of files;
  • N, P: move to next/previous diff hunk;
  • B, O: mov the next/previous unselected diff hunk.
Explore the menus to find out about the other default bindings. You can customize all the key bindings using the resources.

Pop-up menu

Using the third mouse button in the text area brings a popup menu that contains cursor-sensitive commands, as well as the common commands to navigate between hunks.


You can search the text by bringing up the search dialog. Type your search query and press enter, which will apply the search and display diamond shaped match locations in the overview area. You can then navigate the search results using Ctrl-F and Ctrl-B. Searching will occur in all files simultaneously. You have to reapply the search to search for something else.

You can also move the cursor and display to a particular line from the search dialog.

Other options

Carriage returns (CR) characters in DOS files can be hidden in the text area.

Tabs by default are rendered aligned at each 8 characters, but can be set to any value by changing the tab width option.

Display options

The display options can be fully customized by bringing up the options dialog with the "Display -> Display Options..." menu item. From that dialog you can also customize the colors and fonts.

Redoing the diffs

If a file has changed while xxdiff is up, and there is need to recompute the diffs, invoke the "redo diff" command from the edit menu. The arguments used with the surrogate diff command can be changed by using the dialog provided by the "diff arguments" command. One can also replace a loaded file with a different one by using the "open" commands from the "file" menu.

Other UI elements

The following other UI elements can be optionally hidden or displayed from the Windows menu or Display menu (use the resource file to display or hide them on startup):

Comparing two files

When invoking xxdiff with two files, we normally think of an old and a new file, where

xxdiff old new
The default colors used here are symmetrical, so invoking the files in a different order will result in regions being assigned the same colors.

Types of hunks

The following hunk types can appear when comparing two files:

  • Same: no change in that region;
  • Insert: text has been added to the new file;
  • Delete: text has been deleted from the new file;
  • Diff: text has changed between the files.
Note that each Diff or Insert hunk is always separated by a Same hunk (if it was not the case, then two different contiguous hunks would necessarily get merged into a single Diff hunk).


You can ignore trailing blanks, whitespace, or case for two-way diffs. See GNU diff(1) manual for information these features. xxdiff provides menu items to access these diff options. Those items simply add or remove switches to the diff program command-line and call the diff program again to regenerate the diffs.

Switches for GNU diff algorithm quality are also provided in the UI as a convenience.

Comparing three files

When invoking xxdiff with three files, we think of an ancestor file, a "mine" file, which the current user has been working on, and a "yours" file which someone else has merged in the main tree. They are normally specified in the following order:

xxdiff mine older yours
The default colors used here are symmetrical, so invoking the files in a different order will result in regions being assigned the same colors.

Types of hunks

The following hunk types can appear when comparing two files:

  • Same: no change in that region;
  • Insert: text has been added one of the files;
  • Delete: text has been deleted from one of the files;
  • DiffOne: text is different in one of the three files but the two other files are the same.
  • DiffAll: text is different in all of the three files.
  • DiffDel: text is different in two files and is absent in the third.

Ignoring one file

In three-way mode, it can be useful to temporarily ignore one of the three files to concentrate on the differences between the other two. This feature is available from the Display menu and is performed by simply remapping colors at display time and doesn't require xxdiff to recompute the differences. The ignored file will be displayed as grayed out.

Comparing two directories

When invoking xxdiff with two directories, we normally think of an old and a new directory, where

xxdiff olddir newdir
The default colors used here are symmetrical, so invoking the files in a different order will result in regions being assigned the same colors.

Types of hunks

The following hunk types can appear when comparing two directories:

  • Same: files are present in both directories and have no differences;
  • Insert: file has been added to directory;
  • Delete: file has been removed from directory;
  • Diff: files are present in both directories and have differences;
  • Directories: directories are present in both directories but we don't know if they differ;


The directories can be compared recursively, in which case no directories will be shown. You can activate this from the command-line or from the ui.

You can also instruct xxdiff not to display the files that haved changed, just the insertions and deletions.

File operations

In directory diffs mode, you can invoke an xxdiff on the pair of files or directories under the line cursor. This allows you to start xxdiff on a pair of directories, and then to examine the pairs of files that have changed, all from that directory diff. That functionality is available from the popup menu in the text area (right-click).

You can also copy and remove files from that menu, see merging section for details.

Merging files and resolving conflicts

Merging files is the process of manually resolving conflicts when two files cannot be merged automatically. This is a common problem when doing parallel software development where multiple developers could be working on the same files.

Most of the merging can be handled automatically, because if the changes were applied to fairly independent parts of the files, most of the changes will be insertions or deletions. However, when overlapping changes occur, no automatic decision can be taken.

xxdiff can be used to resolve conflicts by letting the user "select" which side of a diff hunk should be killed and what side should be kept. The user can take this decision on a line-by-line basis, and can decide to keep both sides as well, in any order. xxdiff then allows the user to save the resulting file.

Selecting regions

Selecting a diff hunk can be carried out by clicking on it. The colors update to display which side is selected for output. You can select individual lines with the second button. There are three types of selection that you can carry out:

  • select clicked file;
  • select no file (take the decision that nothing will be output);
  • leave the line/hunk unselected.

If you want to select more than one side, you have to invoke the split-swap-join command (default is on 'S' key), which will split the current diff hunk if it's a Diff hunk so you can select the pieces you want from both sides. Further invocations of this command will cause swapping the regions, looping through all the different ordering possibilities, and finally joining the regions again (preserving selections where it is possible).

Saving the resulting file

The resulting file can be save under one of the input filenames, or under a new filename (from the File menu). If some regions are left unselected, the save dialog will have some widgets that allows you to decide how you want to save the unselected hunks:

  • Save as merge conflicts: save all sides, separating them with merge conflict markers similar to those inserted by CVS;
  • Save with conditionals: save all sides, separating them with C pre-processor directives, so that you could then use a #define directive to have one set of changes or another be active if compiling.
The markers and pre-processor directives can be customized through the resources file.

There is a customization flag that lets you specify that xxdiff should warn you when trying to save with some regions unselected. It will bring the cursor to the first remaining unselected region and ask for confirmation. This can be used to insure that the user has made all the required decisions before saving and that no text will be forgotten.

You could also decide to save only the selected regions, from the File menu. This can be useful for making comments when reviewing merges.

Rapid, sequential merge conflict resolution

Some people like to merge files within a guided process, where the visual diff program asks for a merge decision for each conflictual hunk one-by-one and then asks for a filename to use for saving the merged output. For example, that is how ClearCase's xcleardiff works when querying the user to resolve conflicts.

There are a set of commands under the Region menu that allows one to rapidly take decisions on merge conflicts. These commands perform a selection and then automatically move the cursor to the next unselected region. If there are no more unselected regions, the save dialog is brought up automatically.

Automatic merge

By default, xxdiff doesn't perform any selections. You can instruct xxdiff to perform selection of the non-conflictual regions automatically. This can be specified from the command-line or from the Global menu.

Merging directories

Selecting is disable in directory diffs mode, where the concept of "saving" a directory does not really make sense. However, you can apply changes to a directory from xxdiff, such as copying and removing files under the line cursor. This can be invoked from the popup menu in the text area.

Merged view

During selection or before saving the selected regions into the result file, you might want to visualize what it would look like with the current selections. You can display the "merged view" for this purpose, an dedicated window showing the merge output, that updates interactively as you make selections.

This view will scroll to match the main display. Unselected regions are shown in this view with oblique lines ("in construction" style), and merge decisions are slightly highlighted as well. This output allows you to review the merge decisions before commiting the file to output.

Merge review features

One of the most important uses of xxdiff is to assist the merge review process, where one developer visualizes the file changes of another and approves or rejects those changes, making comments along the way.

For this purpose, xxdiff puts selected text in the clipboard text buffer when you select it. Thus, the merge cop can select a region, and paste the results in a neighboring editor window.

These snippets of code will typically be interspersed with comments. xxdiff can be format the line contents before they are copied to the clipboard, to make them distinct from the merge comments. This can be enabled using the "format clipboard text" option. The clipboard format is a string that contains format specifiers similar to printf. The following specifiers are allowed:

  • %N: file line (0 is leftmost file);
  • %L: line number;
  • %F: filename;
  • %s: line contents.

Also note that clicking on the filename labels will put the filenames in the clipboard for similar cut-n-paste action. This can be useful when reviewing ClearCase revision files, which often have very long p-names.

Editing files

There has been a conscious decision NOT to develop xxdiff into a fully-featured editing program. Sometimes it could be handy to be able to edit a few lines of a difficult conflict. However, that is a task best left to your own favorite editing program. Saving with merge conflicts will allow you to resolve those few remaining conflicts by hand.

However, a few commands have been provided under the File menu to spawn an editor on the input files. You can then redo the diff after your input file has changed.

Customization using resource file

Much of the state of xxdiff can be customized through a resource file (actually, some of the features can only be changed through resource customization). By default, xxdiff looks for the file .xxdiffrc located in the user's home directory (this file location can be overriden by setting the environment variable XXDIFFRC), and reads that file for resource definition.

The format of the resource file is a fairly simple list of colon-separated resource name/value pairs, one per line:

resourceName: "value"
Any text after "#" on a line is considered a comment and ignored.

Some resources may require string delimiters (double-quotes) around their value specification, but not all (see below).

You can also specify additional resources on the command-line, which take precendence over the resources specified in the resource file. To get a complete list of the available resources, use the --list-resources command-line option (see options section).

Trick: you can use different resources files by invoking xxdiff like this in most shells:

XXDIFFRC=myrcfile xxdiff file1 file2

Automatic generation of the resource file

You can generate a resource file containing only the differences from the defaults from the "Help -> Generate init file" menu command. This can be used to "save" the current customizable options.

Resource reference

This section contains a reference of the all the currently supported customizable resources in this version of xxdiff.

Geometry: 1200x600
Preferred geometry upon initialization. Format is the same a X geometry specification, plus you can also use `Maximize' to maximize on startup
Accelerators for most functionality. The name of the accelerator should be explicit enough that you can find which function it is bound to.
Accel.Exit: "<key>"
Accel.OpenLeft: "<key>"
Accel.OpenMiddle: "<key>"
Accel.OpenRight: "<key>"
Accel.SaveAsLeft: "<key>"
Accel.SaveAsMiddle: "<key>"
Accel.SaveAsRight: "<key>"
Accel.SaveAs: "<key>"
Accel.SaveSelectedOnly: "<key>"
Accel.EditLeft: "<key>"
Accel.EditMiddle: "<key>"
Accel.EditRight: "<key>"
Accel.Search: "<key>"
Accel.SearchForward: "<key>"
Accel.SearchBackward: "<key>"
Accel.ScrollDown: "<key>"
Accel.ScrollUp: "<key>"
Accel.CursorDown: "<key>"
Accel.CursorUp: "<key>"
Accel.CursorTop: "<key>"
Accel.CursorBottom: "<key>"
Accel.RedoDiff: "<key>"
Accel.EditDiffOptions: "<key>"
Accel.EditDisplayOptions: "<key>"
Accel.DiffFilesAtCursor: "<key>"
Accel.CopyFileRightToLeft: "<key>"
Accel.CopyFileLeftToRight: "<key>"
Accel.RemoveFileLeft: "<key>"
Accel.RemoveFileRight: "<key>"
Accel.NextDifference: "<key>"
Accel.PreviousDifference: "<key>"
Accel.NextUnselected: "<key>"
Accel.PreviousUnselected: "<key>"
Accel.SelectGlobalLeft: "<key>"
Accel.SelectGlobalMiddle: "<key>"
Accel.SelectGlobalRight: "<key>"
Accel.SelectGlobalNeither: "<key>"
Accel.SelectGlobalUnselect: "<key>"
Accel.SelectGlobalUnselectedLeft: "<key>"
Accel.SelectGlobalUnselectedMiddle: "<key>"
Accel.SelectGlobalUnselectedRight: "<key>"
Accel.SelectGlobalUnselectedNeither: "<key>"
Accel.SelectGlobalMerge: "<key>"
Accel.SelectRegionLeft: "<key>"
Accel.SelectRegionMiddle: "<key>"
Accel.SelectRegionRight: "<key>"
Accel.SelectRegionNeither: "<key>"
Accel.SelectRegionUnselect: "<key>"
Accel.SelectRegionLeftAndNext: "<key>"
Accel.SelectRegionMiddleAndNext: "<key>"
Accel.SelectRegionRightAndNext: "<key>"
Accel.SelectRegionNeitherAndNext: "<key>"
Accel.SelectRegionSplitSwapMerge: "<key>"
Accel.SelectLineLeft: "<key>"
Accel.SelectLineMiddle: "<key>"
Accel.SelectLineRight: "<key>"
Accel.SelectLineNeither: "<key>"
Accel.SelectLineUnselect: "<key>"
Accel.TabsAt3: "<key>"
Accel.TabsAt4: "<key>"
Accel.TabsAt8: "<key>"
Accel.IgnoreTrailing: "<key>"
Accel.IgnoreWhitespace: "<key>"
Accel.IgnoreCase: "<key>"
Accel.IgnoreBlankLines: "<key>"
Accel.HideCarriageReturns: "<key>"
Accel.DirDiffIgnoreFileChanges: "<key>"
Accel.DirDiffRecursive: "<key>"
Accel.UseInternalDiff: "<key>"
Accel.QualityNormal: "<key>"
Accel.QualityFastest: "<key>"
Accel.QualityHighest: "<key>"
Accel.MergedView: "<key>"
Accel.ToggleToolbar: "<key>"
Accel.ToggleLineNumbers: "<key>"
Accel.ToggleMarkers: "<key>"
Accel.ToggleVerticalLine: "<key>"
Accel.ToggleOverview: "<key>"
Accel.ToggleShowFilenames: "<key>"
Accel.ToggleHorizontalDiffs: "<key>"
Accel.ToggleIgnoreHorizontalWhitespace: "<key>"
Accel.ToggleFormatClipboardText: "<key>"
Accel.IgnoreFileNone: "<key>"
Accel.IgnoreFileLeft: "<key>"
Accel.IgnoreFileMiddle: "<key>"
Accel.IgnoreFileRight: "<key>"
Accel.HelpManPage: "<key>"
Accel.HelpOnContext: "<key>"
Accel.HelpGenInitFile: "<key>"
Accel.HelpAbout: "<key>"
Accel.MergedClose: "<key>"
FontApp: "<xfld-font-spec>"
General application font, used for widgets and menus.
FontText: "<xfld-font-spec>"
Font to use for diff text view.
Color.[NAME].[Fore|Back]: "[COLOR]"
Color choice for diff hunks, and for certain other items in the text view.
Color.Same.Fore: "<color>"
Color.Same.Back: "<color>"
Identical text
Color.Insert.Fore: "<color>"
Color.Insert.Back: "<color>"
Insert text (side with text)
Color.InsertBlank.Fore: "<color>"
Color.InsertBlank.Back: "<color>"
Insert text (blank side)
Color.DiffAll.Fore: "<color>"
Color.DiffAll.Back: "<color>"
Different in all files
Color.DiffAllSup.Fore: "<color>"
Color.DiffAllSup.Back: "<color>"
Different in all files (shadowed)
Color.DiffAllOnly.Fore: "<color>"
Color.DiffAllOnly.Back: "<color>"
Different in all files (only text on lines)
Color.DiffAllNonly.Fore: "<color>"
Color.DiffAllNonly.Back: "<color>"
Different in all files (blank side)
Color.DiffOne.Fore: "<color>"
Color.DiffOne.Back: "<color>"
(diff3 only) Different in one file
Color.DiffOneSup.Fore: "<color>"
Color.DiffOneSup.Back: "<color>"
(diff3 only) Different in one file (shadowed)
Color.DiffOneOnly.Fore: "<color>"
Color.DiffOneOnly.Back: "<color>"
(diff3 only) Different in one file (only text on lines)
Color.DiffOneNonly.Fore: "<color>"
Color.DiffOneNonly.Back: "<color>"
(diff3 only) Different in one file (blank side)
Color.DiffTwo.Fore: "<color>"
Color.DiffTwo.Back: "<color>"
(diff3 only) Common text in two files only
Color.DiffTwoSup.Fore: "<color>"
Color.DiffTwoSup.Back: "<color>"
(diff3 only) Common text in two files only (shadowed)
Color.DiffTwoOnly.Fore: "<color>"
Color.DiffTwoOnly.Back: "<color>"
(diff3 only) Common text in two files only (only text on lines)
Color.DiffTwoNonly.Fore: "<color>"
Color.DiffTwoNonly.Back: "<color>"
(diff3 only) Common text in two files only (blank side)
Color.Delete.Fore: "<color>"
Color.Delete.Back: "<color>"
(diff3 only) Delete text (side with text)
Color.DeleteBlank.Fore: "<color>"
Color.DeleteBlank.Back: "<color>"
(diff3 only) Delete text (blank side)
Color.DiffDel.Fore: "<color>"
Color.DiffDel.Back: "<color>"
(diff3 only) Different and delete text
Color.DiffDelSup.Fore: "<color>"
Color.DiffDelSup.Back: "<color>"
(diff3 only) Different and delete text (shadowed)
Color.DiffDelOnly.Fore: "<color>"
Color.DiffDelOnly.Back: "<color>"
(diff3 only) Different and delete text (only text on lines)
Color.DiffDelNonly.Fore: "<color>"
Color.DiffDelNonly.Back: "<color>"
(diff3 only) Different and delete text (blank side)
Color.DiffDelBlank.Fore: "<color>"
Color.DiffDelBlank.Back: "<color>"
(diff3 only) Different and delete text (empty side)
Color.Selected.Fore: "<color>"
Color.Selected.Back: "<color>"
Selected text
Color.SelectedSup.Fore: "<color>"
Color.SelectedSup.Back: "<color>"
Selected text (shadowed)
Color.Deleted.Fore: "<color>"
Color.Deleted.Back: "<color>"
Deleted text
Color.DeletedSup.Fore: "<color>"
Color.DeletedSup.Back: "<color>"
Deleted text (shadowed)
Color.Ignored.Fore: "<color>"
Color.Ignored.Back: "<color>"
Ignore text
Color.Directories.Fore: "<color>"
Color.Directories.Back: "<color>"
(dir.diffs only) Directories in directory diffs
Color.MergedUndecided.Fore: "<color>"
Color.MergedUndecided.Back: "<color>"
Merged view undecided text
Color.MergedDecided1.Fore: "<color>"
Color.MergedDecided1.Back: "<color>"
Merged view decided text, file 1
Color.MergedDecided2.Fore: "<color>"
Color.MergedDecided2.Back: "<color>"
Merged view decided text, file 2
Color.MergedDecided3.Fore: "<color>"
Color.MergedDecided3.Back: "<color>"
Merged view decided text, file 3
Color.Background.Fore: "<color>"
Color.Background.Back: "<color>"
Global background color
Color.Cursor.Fore: "<color>"
Color.Cursor.Back: "<color>"
Line cursor color
Color.VerticalLine.Fore: "<color>"
Color.VerticalLine.Back: "<color>"
Vertical line color
ExitOnSame: False
If true, exit if both files have no differences.
HorizontalDiffs: True
Enable horizontal diffs display.
IgnoreHorizontalWhitespace: False
Ignore horizontal whitespace in horizontal diffs.
FormatClipboardText: True
Enables clipboard (copy-paste) formatting. If disable, text that goes in the clipboard is simply left unformatted.
IgnoreErrors: False
Disables diff errors reporting.
WarnAboutUnsaved: False
Enables warning upon exiting with unsaved selections.
DisableCursorDisplay: False
Disables displaying the line cursor.
HideCarriageReturns: False
Hides CR characters found in files created under DOS/Windows.
DirDiffIgnoreFileChanges: False
In directory diffs, ignores file changes, show just additions and deletions.
DirDiffBuildSolelyFromOutput: True
In directory diffs, building diffs only from output, not checking against actual directory contents. This is a self-verification feature only, and unless you're doing developemnt you should leave this to default (true).
DirDiffRecursive: False
In directory diffs, enable recursive diff'ing of subdirectories.
UseInternalDiff: True
(Not implemented) Use internal diff computation, does not spawn external diff program.
Show.[NAME]: [True|False]
Set of options to determine if some ui display is visible or not upon startup.
Show.Toolbar: False
Show toolbar on startup.
Show.LineNumbers: False
Show line numbers on startup.
Show.VerticalLine: False
Show vertical line on startup.
Show.Overview: True
Show toolbar on startup.
Show.Filenames: True
Show toolbar on startup.
TabWidth: 8
Tab character alignment width.
Command.[NAME]: "[COMMAND]"
Commands to use to generate diffs. xxdiff is only an interface to display diff results, it doesn't actually compute diffs itself, unless you use the internal commands options, where it uses the same arguments as specified here. Most likely these are the GNU diff commands and options.
Command.DiffFiles2: "diff"
Command to use for comparing two files.
Command.DiffFiles3: "diff3"
Command to use for comparing three files.
Command.DiffDirectories: "diff -q -s"
Command to use for comparing two directories, non-recursively.
Command.DiffDirectoriesRec: "diff -q -s -r"
Command to use for comparing two directories, recursively.
Command.Edit: "vi"
Command to use to spawn an editor on a file.
CommandSwitch.IgnoreTrailingBlanks: "-b"
CommandSwitch.IgnoreWhitespace: "-w"
CommandSwitch.IgnoreCase: "-i"
CommandSwitch.IgnoreBlankLines: "-B"
CommandSwitch.QualityNormal: ""
CommandSwitch.QualityFastest: "-d"
CommandSwitch.QualityHighest: "-H"
Definitions of cmdline switches that should be used to toggle diff options. The defaults are the GNU diff switches (see diff(1)).
OverviewFileWidth: 20
In overview area, width (in pixels) of each file.
OverviewSepWidth: 14
In overview area, width (in pixels) between each file.
VerticalLinePosition: 80
Initial column to draw vertical alignment line.
Tag.[NAME]: [True|False]
Tags used for conditionals used for unselected regions, when that option is used to save files.
Tag.Conflict.Separator: ">>>>>>>>>>>>>>>>>>>> File %d"
String used to separate chunks when saving with conflicts.
Tag.Conflict.End: "<<<<<<<<<<<<<<<<<<<<"
String used to end chunks when saving with conflicts.
Tag.Conditional.Ifdef: "#if defined( %s )"
Ifdef String used when saving with conditionals.
Tag.Conditional.Elseif: "#elif defined( %s )"
Elseif String used when saving with conditionals.
Tag.Conditional.Else: "#else"
Else String used when saving with conditionals.
Tag.Conditional.Endif: "#endif"
Endif String used when saving with conditionals.
ClipboardFormat: "%L: %s"
Format of formatted clipboard text.

Frequently Asked Questions (FAQ)

Can I diff files with CRLF DOS characters in them?

If you want to diff files with CRLF characters in them, you can use the 'ignore whitespace option to GNU diff, which will work, even if only one of the files has the DOS characters in it.

How do I make xxdiff display the revision number of a file?

By default, the filenames window display the filename. From the command-line, howver, you can set it to display an arbitrary string, which could include your current revision number.


This program has been written from scratch and is being actively maintained by Martin Blais (

Reporting bugs

All bug reports and feature requests should be submitted throught the SourceForge bug tracking system at the following URL Please avoid sending the author email about xxdiff bugs. Please use this bug tracking system, it is extremely fast and simple to use.

Project history

This program has been written and inspired after gdiff, mgdiff, and Rudy Wortel's xdiff under SGI. xxdiff aims to provide a lasting open-source replacement to these programs. Writing this tool from scratch was originally motivated by the need to have horizontal diffs, which turned out to be an essential feature of this program.

This program is being extensively tested by several software development engineers at discreet, that use it daily in their merge reviewing activities. It has reached a stable state.


This program is distributed under the GNU General Public License. See the GNU project website for full details.


This program depends on the availability of a textual diff program (such as GNU diff) and the Qt UI toolkit (available at


Thanks go to discreet, for letting me deploy my program there, and for not bothering me with the occasional bug fix that I did on the job. Many more thanks to all the many engineers who tested it there and reported problems with it, as well as providing invaluable suggestions.

SourceForge is hosting my web site and I'm using many of its features. Tomas Pospisek ( has provided a Debian package. Dan Weeks has packaged it for one of the BSD variants (