Comparing Files with Visual Diff Pro

Use Captain's Deck's built-in visual diff viewer to compare text files side by side and see exactly what changed.

Back to Guides

Opening the Diff Viewer

To compare two files:

  1. Select a file in the left pane
  2. Select a file in the right pane (typically a file with the same name, or any file you want to compare)
  3. Press F9

The diff viewer will open showing both files side by side with differences highlighted.

Understanding the Diff View

The diff viewer shows both files side by side with changes highlighted:

Green background Lines added (only in right file)
Red background Lines removed (only in left file)
Yellow background Lines modified (changed between files)
No highlight Unchanged lines

Navigating Differences

Next differenceCmd+Down or N
Previous differenceCmd+Up or P
Jump to lineCmd+G
Scroll both panelsScroll wheel (synced)

Diff Statistics

The status bar shows:

  • Total number of differences
  • Lines added / removed / modified
  • Current difference position (e.g., "3 of 12")

Supported File Types

Visual diff works best with text-based files:

  • Source code (.swift, .js, .py, .java, etc.)
  • Configuration files (.json, .xml, .yaml, .plist)
  • Text documents (.txt, .md, .csv)
  • Shell scripts (.sh, .bash, .zsh)

Note: Binary files (images, compiled code, archives) cannot be compared with visual diff. For these, only a basic "files are identical/different" check is available.

Comparing Directory Contents

To compare two directories:

  1. Navigate to one directory in the left pane
  2. Navigate to the other directory in the right pane
  3. Look at the file listing - files unique to each side are marked
  4. Select matching files and use F9 to compare their contents

Keyboard Shortcuts in Diff View

Close diff viewEscape
Toggle line numbersCmd+L
Toggle whitespace visibilityCmd+Shift+W
Copy selectionCmd+C

Related Guides