20

I've started using diff mode in vim at work, and the one thing I noticed is that the colors are really bright, which doesn't help when you're trying to look for differences in huge files for long periods of time.

Are there any color schemes out there that people have customized to make diff mode easier on the eyes?

12

I quite like the diff colors in my colorscheme:

diff

  • I can't find a proper how-to for installing your colorscheme. I am lost. Maybe it's obvious and I can't really see it. Could you help please? – MycrofD Jun 7 '18 at 9:54
  • Everything is explained in the README. – romainl Jun 7 '18 at 10:28
9

I have a syntax/diff.vim (that I source manually) with the following contents:

hi DiffText   cterm=none ctermfg=Black ctermbg=Red gui=none guifg=Black guibg=Red
hi DiffChange cterm=none ctermfg=Black ctermbg=LightMagenta gui=none guifg=Black guibg=LightMagenta
5

My own scheme "Traffic light colors" featuring red, yellow, green and blue.

They are a bit gentler in GVim than on the terminal.

But they were really designed to be intuitive (for westerners) rather than gentle.

gvim

enter image description here

  • It looks like the JellyBeans colorscheme also uses red, green and blue, although in a slightly different way. – joeytwiddle Jul 9 '16 at 8:07
  • Your scheme is nice, and I'm trying with it. It turns off language-dependent syntax coloring, what I start thinking is something necessary to assure the readability of the differences. +1 – Enrico Maria De Angelis Oct 2 '17 at 13:47
  • 2
    @EnricoMariaDeAngelis Yes, I find language highlighting distracting when I want to focus on the changed characters. You can remove all ctermfg=white and guifg=white from the file, if you like. – joeytwiddle Oct 2 '17 at 14:14
  • 1
    If you do disable the white foreground, you might want to consider setting a background colour instead. Why? If you have long lines but wrapping is off, then the red+yellow change could appear off the screen, and the changed line could easily be missed! I think that's why diffing themes tend to set some styling for the entire line. Oh, we are doing that already. We set the background to black, to draw the attention. (It's subtle, but it might be enough, as long as your Normal background is black though!) – joeytwiddle Jun 28 '18 at 10:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.