Extra|Compare Files

(available in EditPad Pro only)

If you have two versions of the same text file, you can use Extra|Compare Files to visualize the differences between those files. After that, you can edit the generated difference file to merge both versions into a single, new file.

First you need to open the two files you want to compare. The Extra|Compare Files menu item will be grayed out until you have two or more files open.

Selecting Files

To compare the files, first activate the file that contains the original or older version of the document by clicking on its tab. Then select Extra|Compare Files from the menu. In the window that appears, click on the file that contains the newer version of the document, in the list of files that are currently open. The active file is omitted from that list, since you cannot compare a file with itself.

The file that was active at the time you selected Extra|Compare Files in the menu will be considered the "old" file. The file that you select in the file comparison options screen will be considered the "new" file.

How to Compare The Files

You can specify several options when comparing files. The setting for the minimum match size will be explained in detail later. 3 is a good default value.

You can choose to ignore differences in leading spaces and tabs. That is, when comparing two lines, EditPad Pro will ignore any space and tab characters at the start of the lines. Similarly, you can choose to ignore trailing spaces and tabs. That is, spaces and tabs at the end of a line. You can mark both options to ignore both leading and trailing spaces and tabs. If you mark "ignore all differences in spaces and tabs", then EditPad Pro will ignore any spaces and tabs throughout both files when comparing their lines. These options are useful when comparing files where differences in whitespace have little or no meaning.

If you turn on "ignore added and removed blank lines", EditPad Pro will not add blank lines that occur only in one of the two compared files to any new file created by the file comparison. Those lines will also not be highlighted in the original files. Lines with only spaces and tabs will be considered to be blank only if you've turned on one of the options to ignore differences in spaces and tabs.

Finally, "ignore differences in case" tells EditPad Pro to ignore whether a character is uppercase or lowercase, making "A" identical to "a".

What to Display

If you select to highlight changes in the original files, EditPad Pro will mark lines present in the "old" or "original" file in red when they are not present in the "new" or "edited" file. It will also mark lines in the "new" file in green when they are not present in the "old" file. You can configure the "compare files: deleted line" and "compare files: added line" colors in the Colors Preferences.

If you turn on "new file with fully merged contents", EditPad Pro will create a new tab with the two files merged, based on their differences. The tab will be labeled "OldFile compared with NewFile". Lines that are identical in both files are added once and displayed on a normal background. Lines only present in the "old" file are added on a red background, and lines only present in the "new" file are added on a green background. If the text on a line was changed between the "old" and "new" versions of the file, EditPad Pro will first add the old version of the line on a red background, and then the new version of the line on a green background. If consecutive lines where changed, EditPad Pro will first add a block with the old versions of all the consecutive lines, and then the new versions of the consecutive lines.

"New file with removed and added lines" is the same as "new file with fully merged contents", except that lines present in both the "old" and "new" files are not added. Lines are highlighted red and green. Consecutive changed lines are grouped in the same way. The tab will be labeled "Differences between OldFile and NewFile".

"New file with removed lines only" contains a tab with lines that are present in the "old" file, but not in the "new" file. Since all lines are old lines, none of them are highlighted. The tabs label will be "Lines from OldFile removed in NewFile".

Similarly, "new files with added lines only" creates a tab labeled "Lines not in OldFile added to NewFile" with lines present in the "new" file, but not in the "old" file.

Finally, "new file with unchanged lines only" creates a tab labeled "Lines unchanged between OldFile and NewFile". This tab will show all the lines present in both files.

All new tabs with difference output behave like a regular files in EditPad Pro. You can use any editing command on them and save them for later use. If you open the View|File History, it will remind you of the two files that were compared, and which was the "old" or "original" file, and which was the "new" or "edited" file.

See also

Extra Menu
Minimum number of lines for matching block
Extra|Compare with File on Disk
Extra|Next Comparison Mark
Extra|Previous Comparison Mark
Extra|Clear Comparison Marks
View|File History