I already use delta for this: <a href="https://github.com/dandavison/delta" rel="nofollow">https://github.com/dandavison/delta</a><p>I thought delta was fairly well-known by now so I was surprised to see this project not mention it (the readme already has a section for that). I wonder what they've chosen to do differently, besides write it in Node.js.
When I find myself wanting a split diff in the terminal, I tend to gravitate towards just using Vim’s built in diff mode via vim-fugitive. I even have some git aliases that will open vim and and show fugitive diffs for every file changed on the current branch.<p>The I like this over fancy CLI diff viewers for a handful of reasons:<p>- It re-uses my editor config (no need to fuss with that tools ad hoc config format)<p>- I can navigate the diff with my editor’s navigation tools (expand or hide context lines, open/close/reorganize tabs, etc.)<p>- My editor’s language-aware tooling kicks in. I can jump to def, reveal types, and find all references while reading the diffs.<p>I wrote more about some of the specific workflows I use in this post, if you’re curious to level up from a CLI-only diff workflow:<p><a href="https://blog.jez.io/cli-code-review/" rel="nofollow">https://blog.jez.io/cli-code-review/</a><p>There’s a time and a place for CLI-only diff viewers, and kudos to the author for building a tool they enjoy! I’ve just found that they fit into a sort of uncanny valley of simplicity and power for my needs.
I enjoy having good terminal ergonomics for Git.<p>What works for me is tig for git diffs.<p>Also very impressive is kitty-diff. If you use kitty as your OpenGL enabled terminal <a href="https://sw.kovidgoyal.net/kitty/kittens/diff.html" rel="nofollow">https://sw.kovidgoyal.net/kitty/kittens/diff.html</a>
You can just use icdiff to get handsome-looking split diffs in terminal. <a href="https://github.com/jeffkaufman/icdiff" rel="nofollow">https://github.com/jeffkaufman/icdiff</a><p>in your .gitconfig<p><pre><code> [diff]
tool = icdiff
[difftool]
prompt = false
[difftool "icdiff"]
cmd = /usr/bin/icdiff --line-numbers $LOCAL $REMOTE | less -eFXR
</code></pre>
then git difftool
This is cool! A bit slow to start up, probably due to starting up a node process each run, but looks great. Wondering if you have a theme that doesn't include a background color as I quite like my terminal's defaults.
`diff -y` works in a pinch but I generally use icdiff: <a href="https://www.jefftk.com/icdiff" rel="nofollow">https://www.jefftk.com/icdiff</a>
Related but for single pane diffs: <a href="https://github.com/so-fancy/diff-so-fancy" rel="nofollow">https://github.com/so-fancy/diff-so-fancy</a>
The diffs look beautiful. One suggestion to the author be to bundle this as a self-contained binary. This would have a huge impact on whether I want to install it.<p>For this, I would look into Deno, which supports self contained binaries with typescript. I've never tried it myself so not sure how much work this would be.
Is anyone familiar with a good way to programatically create a diff like this as an image?<p>I wrote a small script that tracks changes to your kubernetes cluster and sends a diff of the yaml to Slack. It works but I want to prettify the diff with a GitHub style diff and I need it in image format to send to slack.
I've been using delta: <a href="https://github.com/dandavison/delta" rel="nofollow">https://github.com/dandavison/delta</a><p>It can be easily set up...