Compare versions of a file, or two server logs, side by side.
Comparing Files (⌘D)
Compare with File on Disk is ⌘D. The toolbar prints the document name, then +added and −removed. Compare with chooses the other side: the file on disk, or another open tab. On the shot the columns are STREAM.SWIFT ON DISK and EDITOR, and the counts are +0 −0.
The Two Columns
The two sides scroll together. When they match, the empty line reads that the editor matches the other side.
In a changed block, each removed line sits opposite the added line that is most like it. The characters that changed are highlighted in a stronger colour, so a one-character change is easy to see.
Use Left & Use Right
Each changed block has a button in its first row. ← Use Left replaces the block in the editor with the left side. Use Right → replaces the block on the left with the right side, when the left side is another open tab.
Each apply is one undo step in the changed document, and the comparison refreshes.
Ignore Whitespace & Ignore Case
The Ignore Whitespace and Ignore Case chips in the diff toolbar show those differences as matching lines. Use Left and Use Right still copy each side's real text.
Compare Folders
Choose File > Compare Folders… and pick the left folder, then the right folder. Marlin lists every file as Different, Only Left, Only Right or Same. Hidden files and .git are skipped, and the list holds up to 20,000 files.
Click a Different file to open both versions and compare them. Folders in the toolbar goes back to the list. Close Folders ends the folder comparison.
Refresh
Refresh compares again with the latest contents. A Markdown document can also switch the comparison between Lines and Rendered. Summarise change appears when Apple Intelligence is on.