10. Options & configuration

Options dialog can be opened from View-menu or from toolbar button. Changes made are saved when dialog is closed using OK-button (or pressing Enter-key).

10.1. General options

10.1.1. Backup original file

When this option is enabled backup copy is created before saving the file. Filename for backup file is generated by replacing filename extension with BAK.

10.1.2. Automatically scroll to first difference

When this option is enabled:

after directory compare selection is moved to first different files or directories
after opening files for compare first difference in files is scrolled visible and selected

10.1.3. Disable splash screen

User can disable splash screen appearing when WinMerge is started. It does not make WinMerge start faster (splash screen can be missed by clicking it with mouse) but it saves one click.

10.1.4. Close compare statepane automatically

User can allow WinMerge to close compare statepane automatically after directory compare is ready. After compare statuspane is closed it can be reopened from View-menu (Compare Statepane).

10.1.5. Close Windows with ESC

If this option is enabled, WinMerge closes document windows and application with ESC key. One window is closed with one keypress, so if user has file compare window open one needs three keypresses to close WinMerge: file compare window, directory compare window and then the application.

10.1.6. Automatically verify paths in Open-dialog

When enabled: Open-dialog checks both paths given for validity and doesn't enable OK button until both paths are valid. Unfortunately this checking needs little delay and some users find this delay annoying.

When disabled: Open-dialog enabled OK button by default and lets user to try to open all paths. However error message is shown if path is not valid. This is faster to use, there is no any delay in enabling OK. But user must look at error-dialogs.

10.1.7. Allow only one instance to run

Limits WinMerge program instances to one. If new instance is tried to start, old instance is activated instead. If new instance is tried to open with paths, new paths replace existing ones in previous instance. Or, if multiple compare window support is enabled new compare windows are opened for new paths. (See below.)

10.1.8. Enable multiple compare windows for

Allows opening multiple folder or file compare windows into one WinMerge instance. WinMerge has separate compare documents for folder- and file compare and this option allows selecting multi-window support for both of them independently.

Note

File compare windows are always related to folder compare windows. Even if you disable multiple file compare windows you still can open one file compare window for every folder compare window.

10.1.9. Reset messageboxes (Reset-button)

WinMerge allows user to hide (suppress) some common messageboxes. For example if user doesn't want to see The files are identical messagebox every time two identical files are opened user can check checkbox in that messagebox and close messagebox. Then that messagebox will not be shown again.

However sometimes user may want to see again those hidden messageboxes. Selecting Reset button makes all messageboxes visible again.

Note

It is recommended to reset messageboxes when updating to newer version of WinMerge. Installer does that automatically but if installer is not used then it should be done using this Reset button.

10.2. Compare options

Several compare options allow to ignore some specific type of differences. This is useful in reducing insignificant differences for review purposes.

Ignored difference is shown with different color and it cannot be merged. Difference counts do not include ignored differences. So if files contains only ignored differences they are shown as identical in directory compare.

Important

Ignoring differences affects merging! If user ignores whitespace changes, then e.g. indentation changes in source code files are ignored. That means file's indentation gets messed up when merging. It is strongly recommended to turn off all difference ignore options before merging files!

10.2.1. Whitespace

Compare Whitespace, Ignore whitespace change and Ignore all whitespace are three different levels for comparing/ignoring whitespace characters.

Ignore whitespace change ignores changes in whitespace chars. First three lines in example below illustrate this, those three lines are detected as identical if this option is set. However change between zero and more whitespace characters is NOT ignored. So fourth line is different from first two lines

Example 4. Ignore whitespace change

One space between words:

Two Words

Two spaces between words:

Two  Words

Tab between words:

Two    Words

No spaces between words:

TwoWords

Ignore all whitespace ignores all whitespace characters, except linefeeds. WinMerge compares lines, and even when this option is set linefeeds are intact. All lines in example below are detected as identical.

Example 5. Ignore all whitespace

One space between words:

Two Words

Tab between words:

Two    Words

No spaces between words:

TwoWords

10.2.2. Ignore blank lines

Ignores differences that have only blank (empty) lines. Blank lines are shown in file view, but difference is shown with ignored difference colors and it cannot be merged.

10.2.3. Ignore case

If this option is enabled WinMerge ignores differences between lowercase and uppercase letters. For example "LowerCase" and "LOWERCASE" and "lowercase" are same.

10.2.4. Ignore carriage return differences (DOS/UNIX/MAC)

If this option is not set WinMerge does not detect EOL style differences as differences. If two lines differ only by EOL characters (e.g. DOS EOL and Unix EOL) WinMerge detects files as identical.

10.2.5. Enable moved block detection

When this option is enabled WinMerge tries to detect lines that are moved inside file. Moved lines have own difference colors. Also location pane can show moved lines with line between bars. This makes it easier to visualise changes in files. However if there are a lot of moved lines it may get messy looking.

10.2.6. File compare method

File compare method has three choices:

  • Full Contents - full comparison of files by content, with all the bells and whistles. This method invokes plugins and uses diffutils engine for fully accurate differencing and moved block detection. This is the most complete and recommended method.

  • Quick Contents - slimmed down comparison of files by content. This method uses streamlines file comparison code which skips plugins and moved block detection. The only advantage of this method over Full Contents is that this method does not load the files into method, and so is faster.

    Drawback is linefilters are not applied when comparing. Even if linefilters ignore all differences in files and files are considered identical by Full Contents -compare method this method sees files as different.

  • Modified Date - comparison of modification dates on files. This method only examines the modification dates on the files, so it is far faster than either of the contents methods, but obviously is only as accurate as the modification dates.

10.2.7. Stop after first difference

Note

This option is enabled only when Quick Contents -compare method is selected.

This option allows to optimize compare by not looking whole files, but only until first difference is found.

Drawback is WinMerge may be unable to recognize binary files as such. This is even likely if first difference is in begin of file. Don't enable this if you don't know which kind of files you are comparing. If you know your files then this is a nice way to make compare even faster.

10.3. Editor options

10.3.1. Syntax highlighting

From Editor-page user can enable/disable syntax highlighting. WinMerge can syntax highlight many programming language source codes, web formats etc. Syntax highlighting consumes some processing power, so if WinMerge screen updating seems to be slow, turning off this option might help.

10.3.2. Apply to unrecognized side

When this options is enabled WinMerge applies known file format's syntax highlight to another file even if that file's extension is not known. For example, if you compare files, file.cpp and file.cpp.bak, WinMerge detects file.cpp needs C++ syntax highlight. And then uses same rules for file.cpp.bak too.

10.3.3. Automatic rescan

Enabling automatic rescanning forces WinMerge to rescan after every change done to files, including typing. That's how WinMerge 1.7.1 behaves. For bigger files this can make editing files very slow. To make file editing faster edit events are 'delayed'.

Delaying means WinMerge waits one second after last edit event before rescanning. If new edit event happens during that time editing is done and counter reset to one second. So there should be no rescans during normal typing, but only after user stops typing.

When automatic rescan is disabled, rescan is done only when user selects Rescan or user merges difference.

WinMerge 2.2 release delays more edit events than 2.0.x releases, so selecting between automatic and manual rescan is mostly a matter of taste.

10.3.4. Preserve original EOL chars

Important

This is an advanced option for users who are familiar with EOL bytes and who want to compare files with different EOL styles inside ONE file. It is recommended that this option not be set unless this advanced functionality is needed.

Setting this option allows handling and comparing files with different EOL styles inside ONE file. Two files with different EOL styles can be compared even without this option set! One example reveals functionality behind this option.

This is one example 
text. To show how
smart WinMerge
can be handling 
EOL differences.

And same text in bytes:

5468 6973 2069 7320 6F6E 6520 6578 616D 706C 6520 0D0A
7465 7874 2E20 546F 2073 686F 7720 686F 7720 0D0A
736D 6172 7420 5769 6E4D 6572 6765 0D
6361 6E20 6265 2068 616E 646C 696E 6720 0D0A
454F 4C20 6469 6666 6572 656E 6365 732E

The example presents one simple text file with five lines of text. All lines, except third, are terminated with DOS style EOL (0D0A). Third line has Unix style EOL (0D).

If Preserve original EOL chars-option is not set WinMerge determines file is meant to be DOS style file and converts third line's last bytes to 0D0A before comparing. Missing EOL char is usually an error in file, so WinMerge is smart and fixes this error instead of reporting it as a difference. That's right, WinMerge changes user's file without telling about it to user. WinMerge also shows files EOL style as DOS in filecompare statusbar.

Advanced user might want to handle files without this automatic fixing, file might be handled in systems with different EOL styles (e.g. Windows and Linux). In that case, user can set this option and see WinMerge showing EOL style for every line.

10.3.5. Tab options

From General-page user can set size tabulator character in spaces. Maximum value is 64.

Another selection is if user wants WinMerge to add tab characters or spaces (amount specified by tab size -option) when Tab-key is pressed.

10.3.6. Line Difference Coloring

This option controls coloring of differences inside lines. Normally (Break at whitespace selected) finding differences stops at whitespace characters. This basically means whole words are highlighted.

But if Break at whitespace or punctuation is selected difference finding stops at punctuation characters as well. When this is selected WinMerge can better handle comma separated lists etc. For example, for lines:

10,20,30,40,50

and

10,25,30,45,50

WinMerge would highlight whole lines when using Break at whitespace but only numbers 20/25 and 40/25 when using Break at whitespace or punctuation.

10.4. System options

10.4.1. Send deleted files to Recycle Bin

When this options is enabled files and folders deleted in directory compare are moved to Recycle Bin. Note that use of Recycle Bin may have disabled from system.

10.4.2. Add to explorer context menu

This option enables/disables shell integration. When enabled, new menuitem WinMerge is added to explorer's context menu. User can select one or two files/folders and then select that menuitem to open files/folders to WinMerge.

10.4.3. Enable advanced menu

If this option is enabled there are two items shown in explorer's context menu. First item (Compare) allows user to select path to "memory" and then pick another path and compare those two. This means user does not need to select both paths from same view, but user can select them from different drives etc. Path is forgotten from memory when its compared.

Second item (Compare...) in menu always opens WinMerge with selected path(s).

10.4.4. External editor

WinMerge has a pretty good editor for most basic editing needs. However, it doesn't even compare to many other editors in functionality. WinMerge allows user to define one's personally preferred editor to external editor. Files can be opened in the external editor from the directory compare's context menu.

Notepad is used as the default editor, because it is found on all Windows platforms.

Tip

Commandline parameters can be given, in format: <path to .exe> -option1 -option2 ...

10.5. Archive Support

This page contains download link to 7-zip plugin and contains option related to archive support.

10.5.1. Enable archive file support

Enables or disables archive file support (based on 7-Zip integration).

Like described in Installation section of this manual, there are two different methods how 7-zip can be integrated. Integration method can be changed using this option dialog after install.

10.5.2. Detect archive type from file signature

Enabling this option allows WinMerge to recognize archive files even if their file extension is not known. Basically WinMerge reads beginning of the file and searches for archive-specific signature bytes.

Tip

Enabling this option allows WinMerge to recognize and for example Open Office files.

10.6. Codepage options

These options allow selecting codepage WinMerge uses for ANSI files and if codepage should be read from file contents for specific file formats.

10.6.1. Default codepage for ANSI files

These three radiobuttons can be used to select default codepage WinMerge uses when handling ANSI files. Usually default choice of System codepage is best choice. However if user knows that files are not in same codepage than system uses then user can choose different codepage selecting Custom codepage and typing codepage number to textbox next to it.

Important

This option is read only when files are loaded. Changing this option when the files are open in editor can cause unpredictable changes to files when saving them. Select codepage before loading the files.

10.6.2. Detect codepage info for these files: .html .rc .xml

Important

Uncheck this option in WinMerge.exe. Characters conversions can result in lossy conversions and the risk is very high. WinMerge.exe can display files only with your current codepage.

This option is interesting when your documents use a codepage different from your current codepage (your current codepage is the codepage of your Windows configuration).

For example, you may merge two Slovak or two Japanese files in an English environment. With the required fonts, and this option set, your Slovak, or Japanese, files will be displayed with Slovak, or Japanese, characters.

Actually, WinMerge detects the codepage for these extensions : .html, .rc (resource files for VC++) and .xml.

WinMerge also detects a codepage difference between the left/right files. To avoid lossy conversions during merge/copy/paste, WinMerge proposes you to ignore the codepage information.

Caution

When you paste/copy text to an external application, the external application must use the same codepage as WinMerge does. If your external editor does not support custom codepages, disable this option. Refer to the documentation for your external editor (for copying to WinMerge, Internet Explorer offers codepage selection).