Options

Options and the recent-file-list will be saved when you exit the program, and reloaded when you start it. (Menu Settings->Configure KDiff3 ...)

Font

Select a fixed width font. (On some systems this dialog will also present variable width fonts, but you should not use them.)

Italic Font for Deltas:

If you select this, then text differences will be drawn with the italic version of the selected font. If the font doesn't support italic, then this does nothing.

Colors

Foreground color:

Usually black.

Background color:

Usually white.

Diff Background color:

Usually light gray.

Color A:

Usually dark blue.

Color B:

Usually dark green.

Color C:

Usually dark magenta.

Conflict Color:

Usually red.

Current range background color:

Usually light yellow.

Current range diff background color:

Usually dark yellow.

Color for manually aligned difference ranges:

Usually orange.

Newest file color in directory comparison:

Usually green.

Oldest file color in directory comparison:

Usually red.

Middle age file color in directory comparison:

Usually dark yellow.

Color for missing files in directory comparison:

Usually black.

Changing the colors for directory comparison will be effective only when starting the next directory comparison.

On systems with only 16 or 256 colors some colors are not available in pure form. On such systems the "Defaults"-button will choose a pure color.

Editor Settings

Tab inserts spaces:

If this is disabled and you press the tabulator key, a tab-character is inserted, otherwise the appropriate amount of characters is inserted.

Tab size:

Can be adjusted for your specific needs. Default is 8.

Auto indentation:

When pressing Enter or Return the indentation of the previous line is used for the new line.

Auto copy selection:

Every selection is immediately copied to the clipboard when active and you needn't explicitly copy it.

Line end style:

When saving you can select what line end style you prefer. The default setting is the common choice for the used operating system.

Diff Settings

When comparing files, KDiff3 first it tries to match lines that are equal in all input files. Only during this step it might ignore white space. The second step compares each line. In this step white space will not be ignored. Also during the merge white space will not be ignored.

Ignore numbers:

Default is off. Number characters ('0'-'9', '.', '-') will be ignored in the first part of the analysis in which the line matching is done. In the result the differences will be shown nevertheless, but they are treated as white space.

Ignore C/C++ comments:

Default is off. Changes in comments will be treated like changes in white space.

Ignore case:

Default is off. Case-differences of characters (like 'A' vs. 'a') will be treated like changes in white space.

Preprocessor-Command:

See next section.

Line-Matching Preprocessor-Command:

See next section.

Try Hard:

Try hard to find an even smaller delta. (Default is on.) This will probably be effective for complicated and big files. And slow for very big files.

Merge Settings

Auto Advance Delay (ms):

When in auto-advance-mode this setting specifies how long to show the result of the selection before jumping to the next unsolved conflict.

White space 2/3-file merge default:

Automatically solve all white-space conflict by choosing the specified file. (Default is manual choice.) Useful if white space really isn't important in many files. If you need this only occasionally better use "Choose A/B/C For All Unsolved Whitespace Conflicts" in the merge menu. Note that if you enable either "Ignore numbers" or "Ignore C/C++ comments" then this auto-choice also applies for conflicts in numbers or comments.

Auto merge regular expression:

Regular expression for lines where KDiff3 should automatically choose one source. See also Automatic Merge ...

Run regular expression auto merge on merge start:

If activated KDiff3 runs the automatic merge using the "Auto merge regular expression" when a merge is started.

History start regular expression:

Regular expression for the start of the merge history entry. Usually this line contains the "$Log$"-keyword. Default value: ".*\$Log.*\$.*"

History entry start regular expression:

A merge history entry consists of several lines. Specify the regular expression to detect the first line (without the leading comment). Use parentheses to group the keys you want to use for sorting. If left empty, then KDiff3 assumes that empty lines separate history entries. See also Automatic Merge ...

History merge sorting:

Enable version control history sorting.

History entry start sort key order:

Each parentheses used in the regular expression for the history start entry groups a key that can be used for sorting. Specify the list of keys (that are numbered in order of occurrence starting with 1) using ',' as separator (e.g. "4,5,6,1,2,3,7"). If left empty, then no sorting will be done. See also Automatic Merge ...

Merge version control history on merge start:

If activated KDiff3 runs the automatic history merging using aforementioned options when a merge is started.

Max number of history entries:

KDiff3 truncates the history list after the specified number of entries. Use -1 to avoid truncation. (Default is -1).

Test your regular expressions

This button shows a dialog that allows you to improve and test the regular expressions above. Just copy the respective data from your files into the example lines. The "Match results" will immediately show whether the match succeeds or not. The "Sort key result" will display the key used for history merge sorting.

Irrelevant merge command:

Specify a command of your own that should be called when KDiff3 detects that for a three file merge the file from B doesn't contribute any relevant data that isn't already contained in the file from C. The command is called with the three filenames as parameters. Data matched by the "Auto merge regular expression" or in the history isn't considered relevant.

Directory Merge

These options are concerned with scanning the directory and handling the merge: See the Directory Comparison/Merge Docs for details.

Yet there is one option here that is also relevant for saving single files:

Backup files:

When a file is saved and an older version already exists, then the original version will be renamed with an ".orig" extension. If an old backup file with ".orig" extension already exists then this will be deleted without backup.

Regional and Language Options

Language:

Adjust the language of the user interface. Changing this option doesn't affect the running program. You have to exit and restart KDiff3 so that the language is changed. (This option is not available in the KDE version of KDiff3 because the language is adjustable in the global KDE settings.)

Use the same encoding for everything:

The following encoding options can be adjusted separately for each item or if this option is true, all values will take the first value.

Local Encoding:

Above the codec-selectors appears a note that tells you what the local encoding is. (This is not adjustable but for your information just in case you don't know your local encoding, but need to select it.)

File Encoding for A/B/C:

Adjust the file encoding for input files. This has an effect on how the special characters are interpreted. Since you can adjust each codec separately you can even compare and merge files that were saved using different codecs.

File Encoding for Merge Output and Saving:

When you have edited a file, then you can adjust which encoding will be used when saving to disk.

File Encoding for Preprocessor Files:

When you define preprocessors then they might not be able to operate on your codec. (e.g.: Your files are 16-bit-unicode and your preprocessor can only take 8-bit-ascii.) With this option you can define the encoding of preprocessor output.

Right To Left Language:

Some languages are written right to left. When this option is enabled, KDiff3 draws the text from right to left in the diff input windows and in the merge output window. Note that if you start KDiff3 with the command line option "--reverse" then all layouting will be done right to left too. (This is a feature provided by Qt.) This documentation was written assuming that "Right To Left Language" or reverse layout are disabled. So some references to "left" or "right" must be replaced by their respective counterpart if you use these options.

Miscellaneous

(These options and actions are available in menus or the buttonbar.)

Show line numbers:

You can select if line numbers should be shown for the input files.

Show space and tabulator characters for differences:

Sometimes the visible spaces and tabs are disturbing. You can turn this off.

Show white space:

Turn this off to suppress any highlighting of white-space-only changes in the text or overview-columns. (Note that this also applies to changes in numbers or comments if the options "Ignore numbers" or "Ignore C/C++ comments" are active.)

Overview options:

These choices are only available when you compare three files. In normal mode all differences are shown in one color-coded overview-column. But sometimes you are especially interested in the differences between only two of these three files. Selecting "A vs. B", "A vs. C" or "B vs. C"-overview will show a second overview column with the required information next to the normal overview.

Word wrap diff windows:

Wrap lines when their length would exceed the width of a window.

Show Window A/B/C:

Sometimes you want to use the space on the screen better for long lines. Hide the windows that are not important. (In the Windows-menu.)

Toggle Split Orientation:

Switch between diff windows shown next to each other (A left of B left of C) or above each other (A above B above C). This should also help for long lines. (In the Windows-menu.)

Start a merge quickly:

Sometimes you are viewing the deltas and decide to merge. "Merge current file" in the Directory-menu also works if you only compare two files. A single click starts the merge and uses the filename of the last input-file as the default output filename. (When this is used to restart a merge, then the output filename will be preserved.)

Configuring Keyboard-Shortcuts

Currently only the KDE-version supports user-configurable keyboard-shortcuts. (Menu Settings->Configure Shortcuts...)