25

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?

4 Answers 4

16

I quite like the diff colors in my colorscheme:

diff

4
  • 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, 2018 at 9:54
  • Everything is explained in the README.
    – romainl
    Jun 7, 2018 at 10:28
  • Does it support a light/bright flavor, too? When i use computer during sun shines i switch my terminal to light color scheme. @romainl Looks promising, good work!
    – xliiv
    Aug 9, 2019 at 17:09
  • This colorscheme is great, but I agree with MycrofD that you could flesh out the install a little with maybe a mkdir and curl call. Nov 15, 2019 at 22:40
13

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
1
  • 3
    Something like this should be contributed upstream to VIM. The out of the box colors being completely unreadable because of near zero contrast in diff mode is just silly.
    – Caleb
    Jun 17, 2020 at 11:47
6

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

4
  • It looks like the JellyBeans colorscheme also uses red, green and blue, although in a slightly different way. Jul 9, 2016 at 8:07
  • 1
    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
    – Enlico
    Oct 2, 2017 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. Oct 2, 2017 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!) Jun 28, 2018 at 10:23
4

I went through all colorschemes that go with vim by default, and found 'morning' and 'zellner' look kind of OK for vimdiff.

1
  • Thanks, morning got me through a bind in dark mode tonight.
    – lkraav
    yesterday

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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