top | item 8712417

Icdiff: side-by-side command line diffs

191 points| jefftk | 11 years ago |jefftk.com | reply

53 comments

order
[+] givan|11 years ago|reply
I use http://meldmerge.org and besides syntax coloring it has filters for comments and whitespace, a 3 way file compare and folder compare that is very useful to see changes between code updates.
[+] cbr|11 years ago|reply
meldmerge is great! But I also want something I can use on the command line.
[+] netheril96|11 years ago|reply
Meld is the best diff/merge tool I have tried. But it relies on GTK, which relies on X, which looks terrible on Mac with retina screen.
[+] Gonzih|11 years ago|reply
Most of the time I use vimdiff to diff 2 files. Also allows you to push/pull differences from one buffer to another.
[+] kolme|11 years ago|reply
Vimdiff also support 3-way diffs.

Git integration with fugitive is also worth mentioning. It makes partial committing and cherry picking very easy.

Either way, icdiff looks very promising.

[+] userbinator|11 years ago|reply
GNU diff has the -y option that already does side-by-side diffs; I'm a bit surprised that it doesn't do colouring already.
[+] andyidsinga|11 years ago|reply
I've used that a lot over the years ..and wished the same thing. hell, less can even do color with -R
[+] xixixao|11 years ago|reply
This is great, is there a way to use it with Git?

Edit: It also pains me that this is not the default (or one of the two default) diff views almost anywhere. The best diff I've used was in Phabricator. But Google, Github and Git don't have a support for side-by-side diffs, which I'd argue are the best view in 90% of incremental changes.

[+] jkaptur|11 years ago|reply
Very cool! I love tools that provide better UX around diff - that show not just the shortest possible edit script, but a more human-readable output of what has actually changed. I've been prototyping some ideas in a web app: http://diff.so.
[+] kickingvegas|11 years ago|reply
FWIW, with emacs you can use ediff and then type '|' to change to a side-by-side view.

ediff will also work with SCM (git, svn, etc.) as well.

[+] Wildgoose|11 years ago|reply
This is a great tool. I work on Unix (without X) from Windows and so often have to ftp files about just to use Meld, which is my usual preferred diff tool.

But I can use icdiff in a PuTTY session with a coloured xterm and get a sensible and clear diff comparison.

Thanks! I really appreciate this!

[+] teddyh|11 years ago|reply
When normal “diff” is not clear enough, I use Emacs and its built-in M-x ediff-files (or -buffers). It switches to side-by-side view with the “|” key.
[+] waxjar|11 years ago|reply
I would suggest highlighting the line that changed as well, with a subtle background color.

I mostly use GitGutter, a Sublime Text plugin that puts a symbol in the "gutter" (line numbers column) to indicate which lines changed, where one was deleted or where one was added. It works only on git repositories, though.

[+] ausjke|11 years ago|reply
Had a quick try, looks awesome. it's quicker to do this on command line than vimdiff sometimes.

I use meld for GUI and noticed it's not 100% accurate, sometimes they can not tell if two files are different, which is odd.

[+] kolev|11 years ago|reply
This is a great little gem! It will replace colordiff in my scripts.
[+] cracoucax|11 years ago|reply
Looks great, probably gonna add this to my toolkit.
[+] cracoucax|11 years ago|reply
ah too bad it's a python scrip though, a binary of some sort would have been great. I'm growing wary of python version galore.