Diffing Files

In its diff mode, P4Merge enables you to compare two text files to locate differences. The purple icon () is associated with the first file you selected, and purple bands highlight text that is in the first file but not the second file. The green icon () is associated with the second file you selected, and green bands highlight text that is in the second file but not the first file.

To display diffs in a single pane, choose View>Single Pane Diff Layout. In single-pane mode, delete text is shown using strikethrough text. By default, P4Merge displays diffs in a side-by-side layout.

To toggle the display of line numbers, click .

Navigating Diffs

To move forward and back through individual differences, or to locate specific text or lines, click the toolbar buttons listed below.

Go to next/previous diff   
Find text
Go to line number

Setting Preferences

To configure P4Merge settings to display or suppress differences in white space and line endings, click or choose File>Comparison Method. To configure other settings, choose Edit>Preferences (on Macintosh, choose P4Merge>Preferences).

Note: if you are comparing Unicode files, selection of the correct character set is essential. If you select the wrong character set, P4Merge cannot correctly diff files.