Icdiff: Side-by-side highlighted command line diffs
jefftk.com
jefftk.com
vim -d old.txt new.txt
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: :help diff
or see here https://neovim.io/doc/user/diff.htmlhttps://github.com/junkblocker/patchreview-vim
$ gvim -c"DiffReview git diff origin/master"
It's also often symlinked as `vimdiff`
I often use it with git:
git difftool -t meld -d
https://linux.die.net/man/1/sdiff
It’s not a three-way diff and not highlighted however. (icdiff doesn’t seem to be a three-way diff either.)
https://github.com/dandavison/delta
It doesn't have side-by-side diffs, but it's still well worth having around.
It's a Unix filter, so it works on any unified diff you can come up with.
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).
(And it still doesn't find changes within a line)
But yeah, I see that in-line highlighting of changes can be helpful sometimes :)
* colordiff -y: https://www.jefftk.com/colordiff-y-example-simple.png
* icdiff: https://www.jefftk.com/icdiff-example-simple.png
The two main differences I see are that icdiff can highlight the affected portions of lines, and that icdiff makes better use of horizontal space.
$ git diff --no-index file_a file_bIt’s terminal specific as it uses kitty’s graphics extensions but it looks really IMHO.
* colordiff -y: https://www.jefftk.com/colordiff-y-example-simple.png
* icdiff: https://www.jefftk.com/icdiff-example-simple.png
icdiff also makes better use of horizontal space.
https://ianobermiller.com/blog/2016/07/14/side-by-side-diffs...
https://diffoscope.org/ https://diffoscope.org/examples/https-everywhere-5.0.6_vs_5....
For emacs, you'd want magit + smerge or ediff.
In vim, you'd want vimdiff + vim-fugitive for a few handy helpers.
Is there any reason for not using kdiff3?