vim-one icon indicating copy to clipboard operation
vim-one copied to clipboard

Odd grey background in "git commit -v"

Open felipesere opened this issue 7 years ago • 4 comments

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

felipesere avatar Feb 12 '18 13:02 felipesere

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')

rakr avatar Feb 12 '18 21:02 rakr

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 avatar Feb 12 '18 22:02 felipesere

Adding above lines did have no effect on my diffs 😢

felipesere avatar Feb 13 '18 19:02 felipesere

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

tmandry avatar Mar 23 '19 23:03 tmandry