Expand All
Welcome to Nova!
Projects
Editor
Terminals
Previews
Git
Tasks
Debugging
Remote Files
Extensions
Appendix: Settings
FAQs
Support

Comparison View

See what's changed in your documents.

Nova includes a built-in Comparison View, allowing you to see what has changed between different revisions of a file. Open Comparison View by clicking the Comparison View icon button on the right end of the editor’s path bar, or using the menu item in Editor > Show Comparison (⌥⇧⌘Return).

Nova's Comparison View in action.
Nova's Comparison View in action.

Overview

When enabling Comparison View, the current Editor is divided into two panes. The current version of the file is shown on the left, and the revision you’re comparing against appears on the right. Any lines with changes will be highlighted, along with any added or removed characters.

A closer look at the Comparison View.

To help visualize the relative position of changed lines when content has been added or removed to the document, lines will be drawn between the left and right panes to show where a changed line’s counterpart in the other pane can be found.

A navigation bar will also appear at the bottom of the editor, showing you how many total changes were found. The Back and Forward arrows (<>) allow you to jump directly between changes. Click Ignore Whitespace icon to toggle whether changes only affecting whitespace characters are highlighted.

The navigation bar for Comparison View.

Compare Git Revisions

By default, opening Comparison View in a project with a Git repository will compare the current working version of the file against the revision from the latest commit to the repo.

The Comparison View toolbar.
The Comparison View toolbar.

Along the top of the view, you’ll find a toolbar with buttons displaying which revision is shown in each pane. The commit message for the revision shown will also be displayed. Click either button to open a popover, where you can select a different revision of the file to compare against.

The popover for selecting a revision for comparison.
The popover for selecting a revision for comparison.

From this popover, you can select a particular commit from the current branch, or from other Git branches in the repository, including any remotes. The commit message and hash will be shown for each commit.

NOTE: Only commits that included changes to the current document will be shown.

Compare Arbitrary Files

When working on documents that aren’t tracked in a Git repository, you can still use Comparison View to compare a file against any other arbitrary file. When opening Comparison View for a file untracked by a Git repository, the right pane will initially appear empty, as shown.

A Nova window with Comparison View open, but no file selected in the right pane.

Select the Choose… button to open a file picker, and you can select any file to compare against the current document. You can also drag and drop a file into the empty pane to open it for comparison.

When working in a Git repository, you can also select an arbitrary file to compare against from the revision popover described above by clicking the File picker icon icon in the top-right corner.