Skip to content

Diff Viewer

The Diff tab shows a two-panel comparison of file versions with syntax highlighting, linked scrolling, and change navigation. It opens automatically when you click a file in the Changes tab, a commit’s file list, or a branch comparison.

View Modes

Toggle between two display modes using the toolbar buttons:

  • Split view — side-by-side panels with deletions on the left (red) and additions on the right (green). Scrolling is linked between panels.
  • Unified view — single-column display with deletions prefixed by - and additions by +, similar to a traditional diff output.

Use the change navigation controls in the toolbar:

ControlShortcutAction
Previous changeN (Shift+N) or KJump to the previous hunk
Next changeN or JJump to the next hunk
Hunk indicatorShows “3 of 12” style position

The scrollbar can also display colored change indicators showing where additions and deletions are located throughout the file. Toggle this overlay with the change indicators button.

Staging Controls

When viewing changes from the Changes tab, staging controls appear in the toolbar. Two modes are available:

File Mode

  • Stage — stage the entire file
  • Unstage — unstage the entire file
  • Discard — discard all changes in the file

Hunk Mode

  • Stage/Unstage — toggle staging for the current hunk
  • Stage All / Unstage All — bulk stage or unstage all hunks
  • Discard — discard only the current hunk

In unified view with hunk mode, you can toggle Show Staged Diffs to see which hunks are currently staged.

Toolbar Toggles

ToggleEffect
Collapse contextAuto-collapse long regions of unchanged code. Click a collapsed region to expand it.
Word wrapWrap long lines instead of horizontal scrolling
Change indicatorsShow colored markers on the scrollbar

Binary Files

The diff viewer handles binary files with specialized previews:

  • Images — side-by-side image preview (PNG, JPG, GIF, WebP, SVG, and more)
  • Audio — HTML5 audio players for each version
  • Video — HTML5 video players for each version
  • Other binary — displays a “Binary file differs” message

Keyboard Shortcuts

ShortcutAction
NNext change
Shift+NPrevious change
PPrevious change
JNext change (vim-style)
KPrevious change (vim-style)