If a help option is specified, it must be the only argument specified on the command line\&.
Diffuse
will immediately quit after displaying the help information\&.
.PP
\fB\-h\fR, \fB\-?\fR, \fB\-\-help\fR
.RS4
Display usage information\&.
.RE
.PP
\fB\-v\fR, \fB\-\-version\fR
.RS4
Display version number and copyright information\&.
.RE
.SS"Configuration Options"
.PP
If a configuration option is specified, it must be the first argument specified on the command line\&.
.PP
\fB\-\-no\-rcfile\fR
.RS4
Do not read any initialisation files\&.
.RE
.PP
\fB\-\-rcfile \fR\fB\fIfile\fR\fR
.RS4
Only read initialisation commands from file
\fIfile\fR\&.
.RE
.SS"General Options"
.PP
\fB\-c\fR, \fB\-\-commit\fR\fIrev\fR
.RS4
Open separate file comparison tabs for all files affected by commit
\fIrev\fR
from the remaining paths specified in the command line arguments\&.
.RE
.PP
\fB\-D\fR, \fB\-\-close\-if\-same\fR
.RS4
Close all tabs with no differences\&.
.RE
.PP
\fB\-e\fR, \fB\-\-encoding\fR\fIcodec\fR
.RS4
Use
\fIcodec\fR
to read and write files\&.
.RE
.PP
\fB\-L\fR, \fB\-\-label\fR\fIlabel\fR
.RS4
Display
\fIlabel\fR
instead of the file name\&.
.RE
.PP
\fB\-m\fR, \fB\-\-modified\fR
.RS4
Open separate file comparison tabs for all modified files from the remaining paths specified in the command line arguments\&.
.RE
.PP
\fB\-r\fR, \fB\-\-revision\fR\fIrev\fR
.RS4
Include revision
\fIrev\fR
of the next file named in the command line arguments in a file comparison tab\&.
.RE
.PP
\fB\-s\fR, \fB\-\-separate\fR
.RS4
Open all remaining files specified in the command line arguments in separate file comparison tabs\&.
.RE
.PP
\fB\-t\fR, \fB\-\-tab\fR
.RS4
Start a new tab for any remaining files named in the command line arguments\&.
.RE
.PP
\fB\-V\fR, \fB\-\-vcs\fR\fIvcs\-list\fR
.RS4
Search for version control systems in the ordering:
\fIvcs\-list\fR\&.
.RE
.PP
\fB\-\-line \fR\fB\fIline\fR\fR
.RS4
Start with line
\fIline\fR
selected\&.
.RE
.PP
\fB\-\-null\-file\fR
.RS4
Create a blank file comparison pane\&.
.RE
.SS"Display Options"
.PP
Display options specified in the command line arguments will override saved preference values\&.
.PP
\fB\-b\fR, \fB\-\-ignore\-space\-change\fR
.RS4
Ignore changes to the amount of white space\&.
.RE
.PP
\fB\-B\fR, \fB\-\-ignore\-blank\-lines\fR
.RS4
Ignore changes whose lines are all blank\&.
.RE
.PP
\fB\-E\fR, \fB\-\-ignore\-end\-of\-line\fR
.RS4
Ignore end of line differences\&.
.RE
.PP
\fB\-i\fR, \fB\-\-ignore\-case\fR
.RS4
Ignore case differences in file contents\&.
.RE
.PP
\fB\-w\fR, \fB\-\-ignore\-all\-space\fR
.RS4
Ignore all white space\&.
.RE
.SH"FILE COMPARISON"
.PP
Use the
File \(-> New 2\-Way File Merge,
File \(-> New 3\-Way File Merge, and
File \(-> New N\-Way File Merge
menu items to create additional tabs for comparing text files\&. File names and revisions can be specified either in the command line arguments used to invoke
Diffuse
or in fields on the Open File dialogue\&.
.PP
Diffuse
displays files side\-by\-side inserting gaps to align similar lines of text\&. Differences are highlighted with a different background colour\&.
.SS"Comparison Summary"
.PP
A summary of the compared files is located in the far right margin\&. The summary illustrates where gaps have been inserted to align matching lines of text and highlights differences using colour\&. Manual edits are also highlighted in green\&. A blue cursor identifies the region currently being viewed\&. The viewed region can be changed by clicking anywhere on the summary\&.
.SS"Selecting"
.PP
Lines of text can be selected using the mouse pointer or keyboard\&. Select lines of text with the mouse pointer by clicking on a line\&. Click and drag to select multiple lines\&. Holding down the shift key when clicking will extend the current selection\&. Select lines using the keyboard by pressing the page up/down or arrow keys\&. Extend the current selection by holding down the shift key and pressing the page up/down or arrow keys\&. Move the selection to an adjacent file using the left and right arrow keys\&.
.SS"Matching Lines"
.PP
The mouse pointer or keyboard can be used to manually align lines of text with adjacent files\&. To aligning lines of text using the mouse pointer, select a line of text with the left mouse button, right click on a line of text from an adjacent file, and choose
Align with Selection\&. To align lines of text using the keyboard, move the selection with the cursor keys, press the space bar to pick the current line of text, move the selection with the cursor keys to a line of text in an adjacent file, and press the space bar to pick the target line of text\&. Pressing the
Escape
key will cancel the operation\&.
.PP
Use the
Isolate
menu item to prevent the selected lines from being matched with any lines from the adjacent files\&.
.SS"Editing"
.PP
Press the
Enter
key or double\-click on a text area to enter text editing mode\&. The cursor will change to indicate text editing mode and the status bar at the bottom of the window will display the cursor\*(Aqs column position\&.
.PP
In text editing mode, text can be selected with the mouse pointer by click and dragging\&. The current selection can be extended by holding down the shift key and moving the cursor by clicking with the mouse pointer or pressing any of the arrow, home, end or page up/down keys\&. Individual words can be selected by double\-clicking on them with the mouse pointer\&. Whole lines can be selected by triple\-clicking on them with the mouse pointer\&.
.PP
Modify text by typing on the keyword\&. Modified lines will be highlighted in green\&. Use the
Undo
and
Redo
menu items to undo and redo the previously preformed operations\&.
.PP
Press the
Escape
key or click on another file\*(Aqs text area using the left mouse button to leave editing mode\&.
.SS"Merging"
.PP
Use the difference buttons or menu items to navigate between blocks of differences within a file\&. When navigating,
Diffuse
will move the selection to the next continuous set of lines with differences or edits\&.
.PP
Use the merge buttons or menu items to copy blocks of text into the selected range of lines\&. The
Undo
and
Redo
menu items can be used to undo and redo the previously preformed operations\&. All changes to a set of lines can be reverted using the
Clear Edits
menu item regardless of the order the edits were performed\&.
.SH"VERSION CONTROL"
.PP
Diffuse
can retrieve file revisions from several version control systems via their command line interface\&. The Microsoft Windows build of
Diffuse
is able to use both the Cygwin and native versions of the supported version control systems\&. When using
Diffuse
with Cygwin, ensure
Diffuse\*(Aqs Cygwin preferences correctly describe your system\&. If the
Update paths for Cygwin
preference exists for a version control system, it must be enabled to use the Cygwin version\&.
.PP
Version control systems are sensitive to the system path and other environment variable settings\&. The
Launch from a Bash login shell
preference may be used to easily set the environment for Cygwin version control systems\&.
.SS"Viewing Uncommitted Modifications"
.PP
The
\fB\-m\fR
option will cause
Diffuse
to open comparison tabs for each file the version control system indicates has uncommitted modifications\&. This is convenient for reviewing all changes before committing or resolving a merge conflict\&. If no paths are specified the current working directory will be used\&. For example, view all of your uncommitted modifications with this command line:
.PP
.ifn\{\
.RS4
.\}
.nf
$ \fBdiffuse \-m\fR
.fi
.ifn\{\
.RE
.\}
.PP
The default revision of a file will be used for comparison if only one file is specified\&. For example, this will display a 2\-way merge between the default revision of
foo\&.C
and the local
foo\&.C
file:
.PP
.ifn\{\
.RS4
.\}
.nf
$ \fBdiffuse foo\&.C\fR
.fi
.ifn\{\
.RE
.\}
.sp
.SS"Specifying Revisions"
.PP
The
\fB\-r\fR
option may also be used to explicitly specify a particular file revision\&. Any revision specifier understood by the version control system may be used\&. The local file will be used for comparison if only one file revision is specified\&. For example, this will display a 2\-way merge between revision 123 of
foo\&.C
and the local
foo\&.C
file:
.PP
.ifn\{\
.RS4
.\}
.nf
$ \fBdiffuse \-r 123 foo\&.C\fR
.fi
.ifn\{\
.RE
.\}
.PP
Multiple file revisions can be compared by specifying multiple
\fB\-r\fR
options\&. For example, this will display a 2\-way merge between revision 123 of
foo\&.C
and revision 321 of
foo\&.C:
.PP
.ifn\{\
.RS4
.\}
.nf
$ \fBdiffuse \-r 123 \-r 321 foo\&.C\fR
.fi
.ifn\{\
.RE
.\}
.PP
Local files can be mixed with files from the version control system\&. For example, this will display a 3\-way merge between revision MERGE_HEAD of
foo\&.C, the local
foo\&.C
file, and revision HEAD of
foo\&.C:
.PP
.ifn\{\
.RS4
.\}
.nf
$ \fBdiffuse \-r MERGE_HEAD foo\&.C foo\&.C \-r HEAD foo\&.C\fR
.fi
.ifn\{\
.RE
.\}
.PP
For the
\fB\-c\fR
option may be used to easily specify a pair of sequential revisions\&. For example, this will display a 2\-way merge between revision 1\&.2\&.2 of
foo\&.C
and revision 1\&.2\&.3 of
foo\&.C:
.PP
.ifn\{\
.RS4
.\}
.nf
$ \fBdiffuse \-c 1\&.2\&.3 foo\&.C\fR
.fi
.ifn\{\
.RE
.\}
.PP
Diffuse
does not limit the number of panes that can be used for comparing files\&. The inputs to a Git octopus merge could be viewed with a command line like this:
Resources can be used to customise several aspects of
Diffuse\*(Aqs appearance and behaviour such as changing the colours used in the user interface, customising the keyboard shortcuts, adding or replacing syntax highlighting rules, or changing the mapping from file extensions to syntax highlighting rules\&.
.PP
When
Diffuse
is started, it will read commands from the system wide initialisation file
/etc/diffuserc
(%INSTALL_DIR%\ediffuserc
on Microsoft Windows) and then the personal initialisation file
~/\&.config/diffuse/diffuserc
(%HOME%\e\&.config\ediffuse\ediffuserc
on Microsoft Windows)\&. This behaviour can be changed with the
\fB\-\-no\-rcfile\fR
and
\fB\-\-rcfile\fR
configuration options\&. A Bourne shell\-like lexical analyser is used to parse initialisation commands\&. Comments and special characters can be embedded using the same style of escaping used in Bourne shell scripts\&.
.SS"General"
.PP
\fBimport \fR\fB\fIfile\fR\fR
.RS4
Processes initialisation commands from
\fIfile\fR\&. Initialisation files will only be processed once\&.
\fIname\fR\&. Syntax highlighting uses a simple state machine that transitions between states when certain patterns are matched\&. The initial state for the state machine will be
\fIinitial_state\fR\&. All characters not matched by a pattern will be tagged as
Adds a pattern to the previously declared syntax style\&. Patterns are tried one at a time in the order they were declared until the first match is found\&. A pattern will only be used to match characters if the state machine is in the state
\fIinitial_state\fR\&. The state machine will transition to
\fIfinal_state\fR
if the pattern defined by
\fIpattern\fR
is matched\&. Case insensitive pattern matching will be used if
\fBignorecase\fR
is specified\&. All characters matched by the pattern will be tagged as
\fItag\fR
for highlighting\&.
.RE
.SH"FILES"
.PP
The following files are used by
Diffuse:
.PP
/etc/diffuserc
.RS4
system wide initialisations (%INSTALL_DIR%\ediffuserc
on Microsoft Windows)
.RE
.PP
/usr/share/diffuse/syntax/*\&.syntax
.RS4
syntax files for various languages (%INSTALL_DIR%\esyntax\e*\&.syntax
on Microsoft Windows)
.RE
.PP
~/\&.config/diffuse/diffuserc
.RS4
your initialisations (%HOME%\e\&.config\ediffuse\ediffuserc
on Microsoft Windows)
.RE
.PP
~/\&.config/diffuse/prefs
.RS4
your saved preferences (%HOME%\e\&.config\ediffuse\eprefs
on Microsoft Windows)
.RE
.PP
~/\&.local/share/diffuse/state
.RS4
data persistent across sessions (%HOME%\e\&.local\eshare\ediffuse\estate
on Microsoft Windows)
.RE
.SH"AUTHOR"
.PP
Diffuse
was written by Derrick Moser
<derrick_moser@yahoo\&.com>\&.
.PP
\(co 2006\-2014 Derrick Moser\&. All Rights Reserved\&.
.SH"COPYING"
.PP
Diffuse
is free software; you may redistribute it and/or modify it under the terms of the
GNU General Public License
as published by the Free Software Foundation; either version 2 of the licence, or (at your option) any later version\&.