I would like to know if there is a way to get the standard side by side
diff view in
magit. That is, instead of seeing the old code chunk and the new one one after the other, I'd like to see them on the same horizontal alignment.
The Emacs package for doing this is named Ediff and Magit supports Ediff. To get started press e on the change for which you want to see the side-by-side comparison. You might also have to use E occasionally to tell Ediff/Magit explicitly what you want to compare.
Using Emacs and Magit on Windows, I didn't find it intuitive to get side by side diffs (with 2 windows instead of 3) even with the above answer. Adding this in case it helps others. Here's what I did to get it working for me.
Install cygwin and add the bin directory to PATH (this makes the
edifftool available to Emacs - can probably ignore this on non-Windows platforms)
Add the below to ~/.emacs to get 2 instead of 3 windows in the diff (ignore this if you want 3 windows)
(setq magit-ediff-dwim-show-on-hunks t)
Add the below to ~/.emacs to have it default to side by side
(custom-set-variables '(ediff-split-window-function (quote split-window-horizontally)))
Press E then E when over a changed file, this opens Ediff and shows a separate frame (top level Window) running Ediff, make sure that the Ediff frame has focus when entering commands
Press SPACE/BACKSPACE to move around through the differences (and press ? to toggle the Ediff frame between minimal and a larger size which shows all the commands)
Press q to exit the Ediff session and respond to the prompts back in the main Emacs frame