rakr / vim-one

Adaptation of one-light and one-dark colorschemes for Vim
MIT License
1.99k stars 196 forks source link

Odd grey background in "git commit -v" #76

Open felipesere opened 6 years ago

felipesere commented 6 years ago

I just switched to vim-one following the instructions on the README.md. I've also added xterm-256colors-italic support to get italics (which works 90% the time)

When I went to commit some changes (using -v to see the diff) I was presented with this odd grey background on the changes.

I am not using tmux, Neovim 0.2.2 iTerm2 Build 3.1.5

Snippet from my ~/.config/nvim/init.vim

set termguicolors
colorscheme one
set background=light
let g:one_allow_italics=1 
highlight Comment cterm=italic
let g:airline_theme='one'
screen shot 2018-02-12 at 13 41 17 screen shot 2018-02-12 at 13 40 57
rakr commented 6 years ago

Hi, nothing seems to be wrong in your screenshot. By design the diffs do have a grey background.

  call <sid>X('DiffAdd',     s:hue_4, s:visual_grey, '')
  call <sid>X('DiffChange',  s:hue_6, s:visual_grey, '')
  call <sid>X('DiffDelete',  s:hue_5, s:visual_grey, '')
  call <sid>X('DiffText',    s:hue_2, s:visual_grey, '')
  call <sid>X('DiffAdded',   s:hue_4, s:visual_grey, '')
  call <sid>X('DiffFile',    s:hue_5, s:visual_grey, '')
  call <sid>X('DiffNewFile', s:hue_4, s:visual_grey, '')
  call <sid>X('DiffLine',    s:hue_2, s:visual_grey, '')
  call <sid>X('DiffRemoved', s:hue_5, s:visual_grey, '')

You can change the background in your vimrc/vim/init.vim using like so:

call one#highlight('DiffDelete, '', '', 'none')
felipesere commented 6 years ago

Thank you @rakr for the swift response. After adding all of those - changing them to one#highlight(...) I still see the gray background:

These are my settings:

set termguicolors
colorscheme one
set background=light
let g:one_allow_italics=1
let g:airline_theme='one'

call one#highlight('DiffDelete', '', '', 'none')
call one#highlight('DiffAdd',    '', '', 'none')
call one#highlight('DiffChange', '', '', 'none')
call one#highlight('DiffDelete', '', '', 'none')
call one#highlight('DiffText',   '', '', 'none')
call one#highlight('DiffAdded',  '', '', 'none')
call one#highlight('DiffFile',   '', '', 'none')
call one#highlight('DiffNewFile','', '', 'none')
call one#highlight('DiffLine',   '', '', 'none')
call one#highlight('DiffRemoved','', '', 'none')

What would a vim command be to check if these are having any effect?

felipesere commented 6 years ago

Adding above lines did have no effect on my diffs 😢

tmandry commented 5 years ago

I had unwanted gray backgrounds when italics were enabled; you could try disabling those.