Diff Viewer

Side-by-side and inline diffs with syntax highlighting — review changes without leaving the browser.

Opening Diffs

There are several ways to open a diff:

  • From Git Graph — click any commit to see its diff.
  • From terminal — run suwu open --diff file1 file2.
  • Context menu — right-click a tile and select "Diff".
# Compare two files
suwu open --diff old.go new.go

# Diff against git HEAD
suwu open --diff --git HEAD~1 file.go

View Modes

  • Side-by-side — original on the left, changes on the right. Lines are aligned for easy comparison.
  • Inline — unified diff format with additions and deletions highlighted in context.

Toggle between modes with the toolbar buttons or keyboard shortcut.

Reading Diffs

  • Green lines — additions.
  • Red lines — deletions.
  • Gray lines — unchanged context.
  • Line numbers — shown in the gutter for both sides.
  • Diff stats — summary of files changed, insertions, and deletions.
  • Jump between changes — use the up/down arrows in the gutter to navigate to the next/previous change.
  • Expand context — click "Show more" between hunks to reveal additional unchanged lines.
  • Search — find text in either pane with Ctrl+F.
Tip

For large diffs, use the minimap on the right edge to see the overall shape of changes and jump to specific regions.

Keyboard Shortcuts

Action Shortcut
Toggle side-by-side / inline Ctrl+Shift+D
Next change Alt+↓
Previous change Alt+↑
Search Ctrl+F
Copy selection Ctrl+C

Supported Diff Formats

  • Unified diff — standard git diff output.
  • Side-by-side — generated from unified diffs.
  • JSON / YAML — structural diffs for config files.
  • Binary — hex comparison for non-text files.