A few months ago, I learned that vc-annotate displays a nicely colorized
git blame in Emacs. Today I learned that it is also interactive. I can cycle through revisions using
n, open the file at a specified revision with
f, view the log with
l, and show a diff with
d or changeset diff with
D. (Unfortunately, the diff is ugly and not in color.)
vc-annotate is included with Emacs. To use, open a version controlled file, and type
C-x v g or
I am using Emacs 23.1 on Ubuntu Maverick
- Switching from Emacs to Vim (actually Spacemacs) — posted 2015-12-31
- My Emacs Python environment — posted 2010-05-10
- Emacs espresso-mode for jQuery — posted 2010-03-10
- Notes on C++ development with Emacs on Ubuntu Linux — posted 2009-07-08
- Creating remote server nicknames with .ssh/config — posted 2008-11-20
I gotta start using Emacs. This is nice!
I find version control support of emacs hard to use. So, I prefer command line interface all the time. But I really could use that one. Specially browsing the history with p and n is awesome.
This makes me fall in love with emacs all over again.
If you use git then try magit. Magit is by far my favorite thing in emacs (which there are alot of things to like).
Magit changed the way I develop.
Another +1 for magit. It's the business.
The best command in vc-annotate is "
a": Reruns annotate from the revision _prior_ to the revision that last changed the current line, so you can dig deeper into that line's raison d'etre, skipping uninteresting commits like whitespace changes.
See how to learn emacs for a more detailed coverage of vc-annotate and other emacs goodness.