Options

Options and the recent-file-list will be saved when you exit the program, and reloaded when you start it. (SettingsConfigure KDiff3... menu item).

Font

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

Colors

Editor and Diff Views:
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.

Folder Comparison View:
Newest file color:

Usually green.

Oldest file color:

Usually red.

Middle age file color:

Usually strong yellow.

Color for missing files:

Usually black.

Changing the colors for folder comparison will be effective only when starting the next folder 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 Tab 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 (treat as white space)

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 (treat as white space)

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

Ignore case (treat as white space)

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 (slower)

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.

Align B and C for 3 input files

Try to align B and C when comparing or merging three input files. Not recommended for merging because merge might get more complicated. (Default is off.)

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.

Show info dialogs

Show a dialog with information about the number of conflicts.

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 (treat as white space) or Ignore C/C++ comments (treat as white space) 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: option when a merge is started.

History entry 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 pair of 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 result: option 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.

Auto save and quit on merge without conflicts

If KDiff3 was started for a file-merge from the command line and all conflicts are solvable without user interaction then automatically save and quit. (Similar to command line option --auto.)

Folder Merge

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

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

Backup files (.orig)

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

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.

Note: Local Encoding is "..."

Above the codec-selectors appears this 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.)

Auto Detect Unicode

This option attempts to use the BOM or meta data from XML/HTML documents to detect Unicode encoding. Failing that it will check if a short sample from the beginning of the file can be interpreted as UTF-8. If this check passes UTF-8 will be used. Otherwise it will fall back to the user selected codec. Only UTF-8 is supported with no BOM or metadata present.

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™.)

Note

This documentation was written assuming that this option 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.)

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 Window menu.)

Merge Current File

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.)

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 (treat as white space) or Ignore C/C++ comments (treat as white space) are active.)

Show Space && Tabulator Characters

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

Show Line Numbers

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

Configuring Keyboard-Shortcuts

Currently only the Frameworks™ version supports user-configurable keyboard-shortcuts. (Menu SettingsConfigure Shortcuts...)