Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
felipesere opened this issue Feb 12, 2018 · 4 comments
Open

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

felipesere opened this issue Feb 12, 2018 · 4 comments

Comments

@felipesere
Copy link

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
Copy link
Owner

rakr commented Feb 12, 2018

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
Copy link
Author

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
Copy link
Author

Adding above lines did have no effect on my diffs 😢

@tmandry
Copy link

tmandry commented Mar 23, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants