File compare window is basically two files opened to editor into two horizontal panes. The editor allows user to do basic file editing inside WinMerge without needing to open files to external editor program or devepment environment.
WinMerge editor is not comparable to specialized editor programs, but it has basic features like Undo/Redo, Find/Replace and Goto (to linenumber). The editor also has a syntax highlighting feature supporting several file formats (colors configurable). Note however WinMerge does not syntax highlight text inside differences. Syntax highlighting can be disabled from options.
![]() |
Tip |
---|---|
If Automatic rescan is not enabled manual refresh is recommended after editing. |
WinMerge uses different (user configurable) colors to highlight and select differences. By default WinMerge shows different lines with yellow background and missing lines with gray background. If user selects the difference, it is shown with red background and missing lines with milder red.
The file headerbar has several functionalities. See screenshot below:
Headerbar shows full path to the open file. If the path is longer than available space one part of the path is replaced with an ellipsis (...). Headerbar also shows:
Headerbar has a context menu with items to copy full path or filename to clipboard.
Statusbar upper line shows information about current line. In first pane:
![]() |
Note |
---|---|
Col counts TAB as X chars (as defined in editor options) and Ch counts TAB as one. |
Next two panes show RO if file is protected and file's EOL style ("DOS/UNIX/MAC"). Note these two different ways to show EOL style. When per-line EOL style is not remembered, EOL style is shown on own pane in statusbar. And when per-line EOL style is remembered line's EOL style is shown after char number. When per-line EOL style is used there is no file-wide EOL style.
Difference between column and char is that column counts tabulator character as so many (space) chars as it occupies (4 by default, can be changed from options). But char count counts tabulator char as one char.
Lower line in statusbar shows current difference and amount of differences. Text can be:
The editor panes (file panes) have gray margin area reserved for line numbers and some symbols. If line numbers are not shown then margin is shown like screenshot below.
Blue circle is a Bookmark. And arrow marks word-wrapped line. Next screenshot shows same lines without word-wrap and with linenumbers.
The editor margin cannot be hidden, it is always visible. If linenubmers are not visible it takes pretty minimal width. Note that with linenumbers the margin width is set so that the longest line number fits into it. So with long files it needs space for several numbers.
Difference navigation commands are in
menu:Before difference can be merged, it must be selected. Selecting can happen by difference navigation keys/items (see below) or by selecting wanted difference directly:
-menu has items for navigating to next/previous and first/last difference. Navigation is always done based on current cursor location. So -command selects next difference from cursor, not from current selected difference.
![]() |
Note |
---|---|
When difference is selected with navigation commands cursor is moved to begin of first line of difference. In both files. |
This command has two important functions:
Using
from -menu user can jump to certain line or difference. Go To -dialog prefills current line and side to Go To -dialog.![]() |
Tip |
---|---|
Go To line number is useful if there is need to merge same change to several target files from one original file. Rather than using or difference navigation it is faster to jump to first line of difference. |
Merging commands are located in
-menu after navigation commands. Basically there are only two types of merging commands - copy difference from right to left and copy difference from left to right. Additional commands make merging several differences easier.and copy difference from side to side. At simplest this means replacing text in destination difference with text in source difference. But because difference can contain also removed lines, new lines may be created or some lines removed. If there are several differences selected, then all fully selected differences are merged with one command. This makes merging many small differences a lot faster.
WinMerge rescans files after every merging operation. This is done to ensure differences were copied correctly and all changes after last rescanning are taken care of. If Automatic rescan-option is not set, user may have edited files and differences may not have shown correctly before merging. If result of merging is not what were wanted, user can undo merging operation.
![]() |
Important |
---|---|
It is strongly advised to run F5) before merging differences if Automatic rescan is set off. Usually files get out of sync when editing and merging differences may have unpredictable results. If merging result looks incorrect try undoing ( -> from menu or Ctrl-Z) it and rescanning files. And then merging again. ( |
-commands merge current difference and then select next difference (if there is one). Using these commands makes merging several differences easier and faster.
-commands sync two open files by merging all differences. Note that you can undo this whole operation with one undo command.
![]() |
Tip |
---|---|
Enable Automatically scroll to first difference -option from general options. This saves you from scrolling to first difference and selecting it. See Options & Configuration -chapter for more information. |
Merge mode can be enabled from the
-menu. It restores the WinMerge 1.7.1 single keys for difference merging and navigating:Unlike the normal mode, in this schema the Alt-key is not needed for these basic operations (which makes them quicker and more convenient). Note that Shift-Arrow, Alt-Arrow and Ctrl-Alt-Arrow keys work in merge mode like in normal mode.
When merge mode is enabled Merge text is shown in statusbar.
Refreshing updates differences after changes are made to files. Its important to do refresh before merging changes between files.
![]() |
Note |
---|---|
Refresh does not reload file. That means, if another programs has updated files etc, those changes are not seen. Refresh updates differences according changes user has done. |
When enabled from Preserve original EOL chars is enabled, WinMerge shows type of EOL (DOS/UNIX/MAC).
menu feature shows all whitespace characters (spaces, tabulators, line ends). This is very useful for example when there are spaces in other file and tabulators in other. Also, ifNormal editing features work in WinMerge editor. User can type and delete text, select text, copy, cut and paste text etc. There is some customisation because there can be removed lines in files (lines existing only in other side). Anyway these customisations are not usually visible to users otherwise that lines can sometimes "jump" when WinMerge has to relocate matching/non-matching files.
WinMerge can automatically highlight all differences it finds in lines. This makes it fast to look through and find differences. See screenshot below for an example of highlighted differences.
This feature can be enabled and disabled from menu
-> .With default settings WinMerge uses whitespace characters (namely spaces and tabulators) to separate words. WinMerge does not consider commas or dots as word separators. That means WinMerge thinks "For Example" is two words but "For,Example" is one word. More characters can be included as word-separator characters from editor options (select from menu Editor page). See Options & Configuration -chapter for more information.
-> andMany times it is useful to see exact differences inside lines. WinMerge can highlight different area between lines. This feature is called Select Line Difference. It is available in -menu, toolbar and shortcut key (F4). In screenshot below there is one difference highlighted
Location pane is a handy side-pane showing a overall (difference) map of files compared.
Location Pane shows differences as they are located in the files. So it gives a good overall view for files compared. Location Pane shows differences with same colors than editor panes. There are different indicators in Location Pane:
Clicking with mouse in Location Pane moves cursor to place clicked in file. Right-clicking with mouse opens the context menu with items to select line to go to. And the visible area locator (area with different background color) can be used like a scrollbar thumb - after pressing down the left mouse butto over it it can be dragged upwards and downwards to scroll the files.
File compare context menu contains items for frequently used features:
Most of these items are familiar from Main menu. Worth noting is last item
. It allows to open file with (system) registered application or with external editor. Also context menu merge-commands are not relative to active file. They always merge the selected difference.Font used by editor can be changed from
-> . Due to limitations in the editor, only fixed width fonts are supported in WinMerge.Font suggestions for use of WinMerge with East Asian languages: