Comparing Files
Text Comparison

Text Comparison

Create a New/Open an Existing Comparison

Start by creating a new file comparison window or by opening an existing comparison.

To create a new comparison use:

  • the File Comparison toolbar button
  • the Cmd + Shift + F shortcut
  • the File > File Comparison > New menu item

To open an existing file comparison, bring up the History window by:

  • clicking on the dropdown arrow to the right of the File Comparison toolbar button, or by

  • going to File > File Comparison and selecting from the list of existing file comparisons, if any.

Open Local Resources for Comparison

Once you have a file comparison window, there are several ways to open a local resource, file or folder, for comparison:

  • by dragging & dropping it onto a text editor
  • by typing its full path into the path entry field: File Path Selector
  • by clicking on File Open dialog box to bring up the File Open dialog box.
  • via the Cmd + O shortcut

Open Remote Resources for Comparison

DeltaWalker is able to access and compare remote resource via any of the following protocols: FTP, SFTP, FTPS, HTTP, HTTPS, and WebDAV.

A remote resource is identified by a unique string, known as a Universal Resource Identifier (or URI), constructed following a well-defined URI syntax.

If access to a remote resource requires a username and a password, those are eventually a part of the URI identifying that resource. For your protection, DeltaWalker allows you to specify a user name and a password only through the Remote Resource dialog and not by typing them into into the Path Entry field. The Open Remote Resource dialog is also the place where you supply other required information such as type of protocol, path on the server, port, etc.

In DeltaWalker there is a Open Remote File dialog and Open Remote Folder dialog, both accessible via the little dropdown arrow, to the right of the folder icon inside the Path Entry field:

Remote resource dropdown menu

And the Open Remote Folder itself:

Open Remote Folder

If the files were dropped onto the editors, the comparison would start immediately; in all other cases, you can start the comparison by a click on the Compare toolbar button

Compare image or by hitting the Enter key.

Understanding the Comparison Results

The result of the comparison will vary wildly depending on input and settings, but in a very general sense, it would look something like this:

Two-way Text Comparison

This screenshot illustrates three types of differences: additions, deletions, and changes (when a block of text that exists in both side has been changed).

The following visual design elements work in unison to communicate clearly and effectively the text comparison results.

Colors

No matter where used—in the text editors, the folder trees, the Bird's-Eye View, or the QuickDiffs—four main colors consistently the type of a difference. These are their default values and their meaning:

You can customize the default comparison colors in Preferences > General > Colors and Fonts.

In two-way comparison, differences are defined always in relation to the first content area: in three-way, in relation to the common ancestor. For instance, an addition means that a block of text has been added to the second file, relative to the first.

Text Editors

The files participating in text comparison are displayed using text editors. Inside these editors, blocks of text identified as differences are colored accordingly and connecting lines are run between blocks that are related.

For convenience, and to save screen real estate, an out-of-the-box DeltaWalker uses a common scroll bar to keep the text editors synchronized and related blocks of text aligned as the editors are scrolled up and down. The alignment is relative to the vertical center of the connecting lines panel.

Bird's-Eye View

The Bird's-Eye view is a vertical color strip located on the right-hand side of a comparison window, immediately next to the scrollbar. Similarly to the QuickDiffs, the Bird's-Eye View tells an interesting story.

Birds-eye view in text comparison

Using small rectangles, known as markers, the Bird's-Eye View renders a scaled-down visual map of all differences between the text files or folders being compared. Each marker communicates the following information about its corresponding difference:

  • type - deletion, addition, change, or conflict (three-way comparison only)
  • size
  • distribution
  • selection (if any)
  • the actual change. In text comparison, this is the text of the lines involved, stacked one on top of each other, together with their line numbers; in folder comparison it shows the resources involved, together with the differencing information available for those resources.

For instance, the Bird's-eye View depicted on the image above shows 2 changes, 1 deletion, 1 addition, and 1 conflict.

It also shows the location of these changes as well as the currently selected difference.

Clicking on a Bird's-Eye View marker scrolls the text editors to the location of the actual difference and selects it. With large files, containing hundreds or thousands of differences, a single marker often represents more than one difference. Clicking on such a marker scrolls the editors to the first of these differences and selects it.

Text Comparison Summary

A summary of the results of a particular text comparison is available in two places:

  • The text comparison summary dialog, representing the number of similar, deleted, added, and changed text blocks in the modified file relative to the reference. Additionally, in three-way comparison, the comparison summary shows the number of conflicting differences.

  • The three status bar comparison summary panels, four in three-way comparison, on the right-hand-side of status bar, representing the number of deleted, added, and changed blocks of text in a modified file relative to its reference. The '-' and '+' icons drawn in the first two panels, aided by the consistent use of colors, and the tooltips, reinforce and communicate the difference types.

    Status bar text comparison summary panels

Navigating Differences

You can navigate differences in DeltaWalker in one of several ways:

  • the Next Next Difference image and Previous Previous Difference image difference toolbar buttons
  • the Navigate > Next Difference & Navigate > Previous Difference menu items
  • Ctrl + Mouse Wheel
  • the mini difference navigation buttons at the bottom of the common scrollbar

Saving Your Changes

To save a modified local or remote file, use any of the following:

  • the File Comparison button located inside the Path Entry field
  • the Cmd + S shortcut; if you want to save all modified files at once, use Cmd + Shirt + S
  • the File > Save menu item

Note that protocols like HTTP and HTTPS, in their standard form, allow only for opening of files, not saving them. Therefore, they are excluded from the Remote Save File dialog. WebDav, a powerful HTTP(S)-based standard, is a notable exception in that it allows for both opening and saving of files.

The File > Save As... and File > Save As Remote... commands allows you to save a file in a location different from the location you opened it from. For instance you can open a local file and save it on a remote server and vice versa. In between, DeltaWalker allows you to visualize, compare, edit, and merge such files, hiding all location details from you.

Note that Office and PDF documents as well as archive/compressed files are opened as read-only.

If you try to close a file comparison window with modified editors, DeltaWalker will display the Save Modified Files dialog and offer you the choice of saving the changes or not. Similarly, if you try to close the application window, DeltaWalker will present you the choice of saving or discarding all editors with unsaved changes.

When saving files using the Save File dialog, you can specify the character encoding and the line delimiter you want this file to be saved with.

See Also