3

I have just installed fugitive and it's working pretty nicely. There appears to be something wrong with :Gdiff though, probably due to an incompatible setting somewhere that I'm hoping you can help me identify. When I run the command, the colours on the screen just go crazy, and nothing useful is happening as far as I can tell, such as highlighting changed lines.

Any clue what could be the problem or where I should look first?


I'm using Gvim x64 for Windows. Here is the output of gvim.exe --version and here is a list of my installed bundles:

SingleCompile
l9
nerdcommenter
nerdtree
pathogen
pylint
smooth_scroll
snipmate
supertab
surround
vim-fugitive
vim-indent-guides
vim-powerline
vim-scriptease

Screenshots

Here is how a normal window looks in gvim.exe with my configuration:

Before Gdiff

This is how it looks when I :Gdiff (with no changes to the file):

After Gdiff (no changes)

And this is how it looks when I :Gdiff and the file has an unstaged change. (I added 2 lines above line 13).

After Gdiff (with changes)

Hubro
  • 56,214
  • 69
  • 228
  • 381
  • Not an answer, but try `:diffu` and see whether it will fix things in both cases. By the way, your version of powerline is outdated. – ZyX Feb 03 '13 at 09:01
  • Same problem on MacVim, latests :( `:diffu` did not help. As soon as I close the middle window in a three-way-merge, however, everything looks like it should. – zerm Mar 19 '13 at 10:04
  • 1
    Try isolating the problem; see if it happens when you only have fugitive loaded. – Quinn Strahl Apr 11 '13 at 17:53
  • What colorscheme are you using? Perhaps it doesn't fully define the colors to use in the vimdiff view. You can check what all the different 'elements' are set to be colored with the `:hi` command. – Troy Patrick Aug 22 '13 at 01:34
  • @Teasp00n: That wasn't the reason. It actually solved itself after a while, I don't think I did anything to fix it. That's why I haven't posted an answer. – Hubro Aug 22 '13 at 12:28

2 Answers2

1

It looks to me as though your diff program is doing a very bad job. What does :set diffexpr? tell you?

In order to isolate the problem, I would get git and fugitive out of the picture. Just make two copies of the file and then, while editing foo.py, :diffsplit bar.py

rudolph9
  • 8,021
  • 9
  • 50
  • 80
benjifisher
  • 5,054
  • 16
  • 18
0

Try to adjust color in the following highlight variable

hi! DiffAdd      guibg=#003300
hi! DiffChange   guibg=#003300
hi! DiffDelete   guifg=#330000 guibg=#330000
hi! DiffText     guibg=#990000