I use relative line numbers thanx to the following settings in my vimrc:

set number
set relativenumber

Since I don't want to wrap lines in diff mode, it's sometimes hard to tell which line include a difference from one buffer to another, when the difference is at the end of a line.

So one could highlight the entire line, but that's not what I want; I also know that there are some bindings to jump from a diff to another, but that's not the purpose of the question.

In diff mode, is it possible to use a different highlighting for the line numbers that include a difference? That way, I could immediately know which of the displayed lines include any differences, even if they are at the end of the lines.

  • not possible. Perhaps a plugin can mark differences in the sign column – Christian Brabandt Jun 25 at 20:29
  • In diff mode, an entire line including any differences is highlighted in DiffChange. To more focus on the changed line, you might want to try syntax off and set diffopt+=context:0. – Rick Howe Jun 26 at 4:38
  • @Christian > Yes, I've looked for such a plugin, but haven't found any... Any idea? @Rick > the context setting is a good idea. I hadn't thought about it, thanx ! – Dupond Jun 26 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.