Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I highlight CVS changes in Emacs?

I'm using emacs with cvs and have cvs mode enabled. I'd like to get line-by-line highlighting of changes from the latest version in CVS. I've seen this done in intellij where there is a green indication for lines added and another indication for lines modified and a third symbol for lines deleted.

Is there a cvs highlighting mode for emacs to show changes from the latest version of cvs? I'm not looking for a cvs diff type functionality that would open in a new buffer, but something that would indicate in my current buffer what lines have been modified.

In the following image there is a blue rectangle on the left side in what Intellij calls the "gutter" to indicate that the code is different than what is in source control.

intellij example
(source: jetbrains.com)

I'm looking for similar functionality in emacs.

like image 654
Alex B Avatar asked Feb 25 '09 21:02

Alex B


People also ask

How do I highlight multiple lines in Emacs?

With Emacs 25, simply press Ctrl + Space and then move your cursor wherever you want to highlight/select the region of text which interests you. After that, you may need these commands: Ctrl + W for cutting. Alt + W for copying.


1 Answers

You can now check out diff-hl, which provides highlighting on the left window fringe.

So far I've tested it only on a few modern DVCSes, but if you're still using CVS, and it doesn't work as well, please file an issue.

like image 183
Dmitry Avatar answered Sep 22 '22 12:09

Dmitry