Finding & Comparing

How to compare two files on a Mac

You can do this with Note My. It puts the two versions side by side and paints the lines that actually differ — here is how to open the comparison and read what it shows you.

Two copies of a config file. A script before and after somebody else touched it. They look the same when you scroll them, and somewhere in there is one changed line that explains everything. Comparing by eye stops working past about twenty lines.

This guide covers how Note My pairs two documents, what the colours in the panes mean, how to move around a comparison, and how to work it as a list until the two files agree.

Note

Comparing happens entirely on your Mac. Neither file is uploaded anywhere, there is no account to sign into, and nothing leaves the machine — which matters when the two files are production configuration.

What comparing does to the window

Entering a comparison rearranges the window into exactly two panes, one document in each. Each side is given its own colour, and that colour appears on the pane and on its tab, so you always know which half of the screen you are reading. Tab reordering is locked while you compare, to stop the pairing shifting under you.

What is compared is what is in the editor — unsaved edits included — not what is on disk. That lets you check a change you have just typed against the original before you commit to saving it. If you want the version on disk instead, save or revert first, then compare.

Our comparison view marks the differences on the text itself, in both panes at once, rather than handing you a separate report to cross-reference. That keeps you in the file you are actually fixing: the change is marked where it lives, with the code around it still readable. Long documents stay usable throughout — the window is yours to scroll, read and type in from the moment the comparison opens.

Compare two files you choose

  1. Open both files

    The comparison works between two open documents, so both have to be tabs first. Press ⌘O, or drag the two files from the Finder onto the tab bar. Two tabs is all it takes — with the pair open, the Compare menu is ready for them.

  2. Open the Compare menu in the toolbar

    The Compare item is the left-and-right arrow in the toolbar, and it carries a chevron because it is a menu. It holds two entries: Compare Files…, where you pick the pair yourself, and Quick Compare, which skips the picking.

  3. Pick a left and a right on the pairing canvas

    Compare Files… dims the window and opens a panel with two scrolling columns of cards, one card per open tab — a left column and a right column. Each card previews the opening of its document, so you can tell two similarly named files apart before you commit to a pair.

    Click a card in each column, or cycle through with the slot buttons. The swap arrow exchanges the two sides if you chose them the wrong way round. A dot beside a slot title means that document has unsaved changes.

  4. Press Compare

    ↩ runs it, ⎋ cancels. The panel is genuinely modal — the window behind it waits — so nothing happens to either document if you change your mind.

Quick Compare, when you already know the pair

Quick Compare in the same menu skips the canvas. With exactly two documents open it pairs them immediately. With more than two open it asks which partner you mean, with a glass prompt reading "Pick a tab to compare with «X» · Click any other tab — Esc to cancel", pulsing the source tab until you click one. A comparison always runs between two documents, so open a second tab and Quick Compare is ready to go.

Tip

With exactly two tabs open, Quick Compare pairs them in tab-bar order, which is the quickest route into a comparison. When you want a particular document on the left and a particular one on the right, use Compare Files… instead and place each side yourself — the swap arrow flips them if you change your mind.

Reading the colours

Differences are painted onto the text rather than shown in a separate report, so you read the file, not a summary of it.

What each tint in a comparison means
What you seeWhat it means
A soft wash across a whole line, blue on one side and red on the otherThis line differs from its counterpart. Blue marks one document throughout the comparison and red marks the other.
A stronger tint over part of a lineThe character-level difference inside that line — the actual words that changed.
An orange or red ghost placeholderA gap: the other document has a line here and this one does not, so the space is held open to keep the two sides aligned.

The stronger character tints only ever appear inside a line that is already washed. A file with one changed word shows one washed line with a few characters picked out, not a wall of colour. Read the washes to find the neighbourhood, then the tints to find the change. On a file with many small edits, that two-level reading keeps the page legible: skim for washes, then slow down where a tint appears.

The compare inspector

A panel opens along the bottom of the window. Its header reads Compare and a summary — "N differing lines", or "No differences". The table below lists every difference with three columns: Document (a colour dot and a short label for the document, so two files with the same name stay distinguishable), Line, and Content, shown with the same syntax colouring you see in the pane.

Click a row and the editor flashes that line in both panes, which is the fastest way to walk a long list of differences without scrolling. Two controls sit in the header: an eye toggle labelled Reveal Invisibles, and Exit Compare. The panel is there for reading and navigating — your documents change only when you type in them.

Scrolling both panes together

Scrolling mirrors between the panes only while Shift is held. Let go and each pane scrolls on its own again. A pill at the top of the window tells you so: it reads "Parallel scroll — Hold Shift to mirror scroll", and switches to "Mirroring scroll" with an accent ring while the key is down. It appears when you enter a comparison, and fades again shortly after you release Shift.

This is a held key, not a mode. Mirroring lasts exactly as long as you want it: hold Shift for the passage you are lining up, release it to read one side on its own, and nothing is left switched on behind you.

Editing while you compare

Both panes stay editable. Fix the line that is wrong and the washes, the character tints and the inspector's count all update as you type, so a difference leaves the screen the moment you resolve it.

That turns the inspector into a worklist: click a row, correct the pane that is wrong, move to the next. When the header reads No differences the two match. Save with ⌘S as usual — the comparison itself never touches what is on disk, so each file changes at the moment you choose to save it.

Leaving compare mode

Press ⎋, or click Exit Compare in the inspector. The window collapses back to a single pane, every colour is cleared from both documents, the two side colours are dropped and tab reordering is re-enabled. Nothing about the comparison is written into either file. If you want it back, run it again from the toolbar.

Starting from the Finder

Select exactly two files in the Finder, right-click, and the Note My ▸ Compare the 2 Files item appears in the submenu. It opens both files as tabs and reports how many lines differ between them — "Compared N files • M differing line(s)."

That answers the first question straight from the Finder — do these two differ at all, and by how much — and it leaves both files open as tabs, ready for the next step. For the painted side-by-side view, open the Compare menu in the toolbar and choose Quick Compare: the pair is already there, so the full comparison is a couple of clicks away.

Troubleshooting

The Compare menu just beeps

Open a second document and the menu comes to life. A comparison is always between two documents, so both the pairing canvas and Quick Compare wait until there is a pair to work with — press ⌘O, or drag another file onto the tab bar, and try again.

Two lines look identical but are marked as different

Something invisible differs — trailing whitespace, a non-breaking space, a smart quote, a stray zero-width character. Turn on Reveal Invisibles in the inspector header. Our hidden-character scanner marks them in both panes, so you can see what is really in the line. It puts them on screen and leaves your text exactly as it is, which means you can look first and decide what to change second.

A whole block is marked changed when only a few lines moved

Where a section has been rewritten heavily, the comparison groups the change: the whole block reads as removed on one side and added on the other. Everything is accounted for — it is presented as one large change rather than a scattering of small ones, which is usually the honest description of what happened to that section.

To read inside such a block, narrow the comparison. Put the two versions of that section into their own documents and compare those instead. A shorter pair gives you the line-by-line pairing, right down to the individual characters that changed.

Making both panes scroll together

Hold Shift. Mirroring is active only while the key is down, and only when the inspector is open with two panes on screen.

My tabs stay put while I am comparing

Reordering is held still for the duration, so the two sides cannot swap underneath you halfway through a read. Press ⎋ to exit and the tab bar behaves normally again.

The comparison is still colouring itself in

Nothing is wrong. On a long document the colours fill in over a moment or two, and the window stays yours to scroll and read while they do. Wait for the count in the inspector header to settle before concluding that a difference has been missed. Both panes stay editable throughout.

Ways to put a comparison to work

Once you can open one in a couple of keystrokes, the comparison becomes your general answer to what actually changed here. A few of the jobs it does particularly well:

  • Check your own edit before you save it. Duplicate the file in the Finder before you start, open both copies, and work in one of them. Because what is compared is what is in the editor, you can hold your unsaved work up against the untouched original at any moment and decide whether to keep it.
  • Hold a config against a known-good copy. Two versions of the same settings file, one working and one not, usually differ in a single line. The line washes take you to the neighbourhood and the character tints take you to the exact value.
  • Confirm a bulk edit did what you meant. Run our find and replace across one copy, then compare it with the original. Every line the replacement touched is marked in both panes, so you see the true extent of the change rather than taking a number on trust.
  • Work the inspector from top to bottom. Click the first row, correct whichever pane is wrong, click the next. The count in the header falls as you go, and No differences is a genuine finish line rather than a guess.
  • Settle an argument about whitespace. When two lines look identical to the eye, Reveal Invisibles puts the trailing spaces, non-breaking spaces and smart quotes on screen in both panes at once, side by side, where the difference becomes obvious.
  • Move through a whole set of files. Open everything you are reviewing as tabs, compare the first pair, press ⎋, then run Quick Compare on the next. The tabs stay exactly where they were between comparisons, so each pair costs you a keystroke or two.
  • Read a colleague's changes in context. Because the differences are painted onto the text itself, you review the change with the surrounding code still readable — which is usually what tells you whether it was a good idea.

Frequently asked questions

Can I work through several files in one sitting?

Yes — a pair at a time, which is how you read differences anyway. Open everything you are reviewing as tabs, compare the first two, press ⎋, then run Quick Compare on the next pair. The tabs stay open throughout, so a folder's worth of files moves along quickly. From the Finder, selecting two files and choosing Note My ▸ Compare the 2 Files opens a pair together with a count of the differing lines.

Does comparing change either file?

Both files stay exactly as they are. The washes and tints live on screen only, are never written into the file, and are cleared from both documents when you leave compare mode. The only thing that changes a file is you typing in it.

Does it compare my unsaved changes, or what is saved on disk?

What is in the editor. Unsaved edits are included, and a dot beside a slot title on the pairing canvas tells you which of the two has them. To compare the versions on disk, save or revert first.

How do I get out of a comparison?

⎋, or the Exit Compare button in the inspector. The window collapses back to one pane and every colour is cleared from both documents.

Is it fast enough for large files?

Yes. Our comparison view is built for long documents: the window stays usable while the colours fill in, and you can scroll, read and edit throughout. Our large-file engine keeps a lengthy log or configuration file responsive while you work through it, and the count in the inspector header tells you when the full list is in.

Do the files leave my Mac to be compared?

No. Comparing happens on your Mac. Nothing is uploaded, there is no account, and neither file leaves the machine.

Can I edit while the two panes are open?

Yes. Both panes stay editable, and the colours and the difference count update as you type, so a difference leaves the screen the moment you resolve it. Every change is yours to make: you type the correction into whichever pane is wrong, exactly as you would in any other document, and watch the count fall.