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

Comments' background #91

Closed
delminskii opened this issue Jan 8, 2016 · 7 comments
Closed

Comments' background #91

delminskii opened this issue Jan 8, 2016 · 7 comments

Comments

@delminskii
Copy link

Hello. I like this theme very much. I use vim 7.4 in terminal (xterm) on debian 7.9. I had to add gruvbox-256-colors.sh at the end of my .bashrc, the colors are applied good enough. But the problem is in comments' background on some files (for example, *.sh, *.py). A line beginning with crunch (#) has background highlight, which I do not want to have. Is that normal behavior? How to fix that? I think I should remove/comment some line in gruvbox/gruvbox-256-colors.sh script.

Take a look at the attachment please: a top side is a chunk of bash file, and the bottom side is the chunk of python file
12

@morhetz
Copy link
Owner

morhetz commented Jan 11, 2016

@delminskii
Doh, that's weird. Can't get my hands at linux box currently.
Could try reproducing this with other terminal emulators like urxvt or gnome-terminal while I'm investigating the issue?

@delminskii
Copy link
Author

@morhetz
I've tested rxvt, rxvt-unicode (urxvt?), lxterm and uxterm - there's the same problem everywhere.

Here's a screenshot of my .Xresources' content if it can help
12

@morhetz
Copy link
Owner

morhetz commented Jan 11, 2016

It would help if you could share your .vimrc.
What's the output of :let g:gruvbox_italic? Any chance you've enforced displaying italics with non-compatible term (let g:gruvbox_italic=1)?
What's your $TERM shell variable set up to? Do run vim inside tmux?

@delminskii
Copy link
Author

The output of :let g:gruvbox_italic is #1;
$TERM is xterm-256color
My current vimrc is here
There's the same behavior inside of tmux.

@morhetz
Copy link
Owner

morhetz commented Jan 12, 2016

The output of :let g:gruvbox_italic is #1;

Oh, that's the reason why comments are get inverted. Seems like this check got interpreted wrong. It is obviously could be only if your $TERM_ITALICS shell var is set up incorrectly since your term emulator can't handle italics correctly. That's weird cause I'm sure rxvt-unicode should be ok with that.

Anyway, here are two different solutions.

  1. You could enforce disabling italics at your .vimrc like this:
" =============================================================================
" Gruvbox colorscheme settings
" =============================================================================
set background=dark
let g:gruvbox_italic=0
let g:gruvbox_contrast_dark='hard'
colorscheme gruvbox

NB: It's advised that you put gruvbox settings above the line colorscheme gruvbox
2. Try investigating why the environment variable $TERM_ITALICS is set to true and handle that correctly anyway

@delminskii
Copy link
Author

@morhetz
oh, yes. The first solution has helped. It's really cool now. Thank you very much for the help, it was my mistake.

@morhetz
Copy link
Owner

morhetz commented Jan 12, 2016

@delminskii
👍

@morhetz morhetz closed this as completed Jan 12, 2016
Guzzii pushed a commit to Guzzii/gruvbox that referenced this issue Nov 15, 2019
Improve readability for lighline's middle section
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

2 participants