Another little known diff power tool:<p><pre><code> vim -d old.txt new.txt
</code></pre>
This will open two files in diff mode. You can then use a whole host of fancy keybindings to edit the two files in a diff-aware way ("apply this hunk to that file" / manually edit a file and then re-render the diff / "fold or expand all non-hunk text" / etc.). For more:<p><pre><code> :help diff
</code></pre>
or see here <a href="https://neovim.io/doc/user/diff.html" rel="nofollow">https://neovim.io/doc/user/diff.html</a>
A similar tool that I really like is meld (<a href="https://meldmerge.org/" rel="nofollow">https://meldmerge.org/</a>). It has a GUI, really nice visual indicators, allows you to view the entire file and directory trees and you can jump between diff chunks using alt + arrow up/down.<p>I often use it with git:<p>git difftool -t meld -d
Delta is a similar tool with syntax highlighting for most programming languages and customizable themes:<p><a href="https://github.com/dandavison/delta" rel="nofollow">https://github.com/dandavison/delta</a><p>It doesn't have side-by-side diffs, but it's still well worth having around.<p>It's a Unix filter, so it works on any unified diff you can come up with.<p>Its default output isn't a unified diff, but that's easy to fix with its configuration / CLI options (I'm too used to reading unified diffs to like delta's simplified default format).
I've been using `alias diff=colordiff` for maybe twenty years. Looks like icdiff can highlight small changes without needing to call out the whole line. Is there anything else new this one brings?
If you're used to Git's diff view and want to use it for any two files outside of a repo, you can do<p><pre><code> $ git diff --no-index file_a file_b</code></pre>
colordiff -y [<a href="https://www.colordiff.org/" rel="nofollow">https://www.colordiff.org/</a>] has similar functionality.
This is a really useful utility. This post explains how to use it with mercurial for better diffs:<p><a href="https://ianobermiller.com/blog/2016/07/14/side-by-side-diffs-for-mercurial-hg-icdiff-revisited/" rel="nofollow">https://ianobermiller.com/blog/2016/07/14/side-by-side-diffs...</a>
I like diffoscope's side-by-side HTML diffs of arbitrary files/dirs, for eg:<p><a href="https://diffoscope.org/" rel="nofollow">https://diffoscope.org/</a>
<a href="https://diffoscope.org/examples/https-everywhere-5.0.6_vs_5.0.7.html" rel="nofollow">https://diffoscope.org/examples/https-everywhere-5.0.6_vs_5....</a>
Related: <i>diff2html</i> CLI that will open your browser to a beautifully-rendered HTML diff:<p><a href="https://diff2html.xyz/" rel="nofollow">https://diff2html.xyz/</a>
ydiff might be the tool you're looking for.<p><a href="https://github.com/ymattw/ydiff" rel="nofollow">https://github.com/ymattw/ydiff</a>