If I do a diff from emacs, I get something that looks like a patch, and the files are concatenated in one big file. Is there any function that I could use to compare them like in this image? It's much easier to see what's changed.
2 Answers
Ediff works similarly: M-x ediff
http://www.gnu.org/software/emacs/manual/html_mono/ediff.html
-
1Exactly what I needed! Thank you ! By the way, maybe you know, is
ediff
written in elisp?– GeoAug 12, 2011 at 9:41 -
2Yes, see the ediff-*.el files is emacs sources here: git.savannah.gnu.org/cgit/emacs.git/tree/lisp?h=emacs-23– TomAug 12, 2011 at 10:33
-
4
-
8To get side-by-side diffs:
(setq ediff-split-window-function 'split-window-horizontally)
Aug 13, 2011 at 1:06
Emacs ediff is no way comparable to vimdiff. I think emacs ediff is just a wrapper on Linux diff command. It is just highlighting the lines diff tool marks as changed.
I found vdiff give vimdiff like granularity. Follow instructions at the below link to use it.