There are certain advantages to not go against the grain when using tools, as evidenced by other answers.
On the other hand, sometimes you just want to tell your editor what to do and let people on the Internet answer your questions rather than say you want to do something else.
magit provides a menu interface for working with the current file through Mx magit-file-popup . The keys you need to click here are du. It may be too many keystrokes for you, if so, you can call magit-diff directly like this:
(magit-diff "master" nil (list buffer-file-name))
You may need to define your own function and key binding for this.
magit-diff has advantages over vc-diff , because if it allows you to go to the diff location.
Att Righ Nov 29 '16 at 4:14 2016-11-29 04:14
source share