thiagowfx's avatar

Β¬ just serendipity πŸ€ (not just serendipity)

β˜… Online diff tool

β€’ 183 words β€’ 1 min β€’ updated

⚠️ This post is over one year old. It may no longer be up to date or relevant. Opinions may have changed.

Sometimes I have two snippets of text in my clipboard1 that I need to diff.

The quickest way to do so is roughly like this:

shell
% cdtmp
% $EDITOR a  # then paste
% $EDITOR b  # then paste the other one
% diff -uN a b

cdtmp was previously covered, it cds to a temporary directory.

The diff tool in the CLI is not very important, you could pick any one between diff -uN, colordiff -uN or icdiff.

However the terminal has its limitations. Sometimes it’s much better to diff with a graphical application.

For macOS I’ve heard that Kaleidoscope is great, but I don’t use it. For Linux there’s KDiff3 and Meld.

It’s much easier to use a web tool though, as it’s operating system agnostic.

Julia Evans has recently recommended diffdiff: https://diffdiff.net/. I like it!

At Google we had an internally hosted one at http://diff/ (or was it go/diff?).


  1. If you’re only able to hold one at a time, you should definitely upgrade your workflow to using a clipboard manager, you’re missing out. For macOS, see my previous post↩︎