junegunn / rainbow_parentheses.vim

:rainbow: Simpler Rainbow Parentheses
377 stars 24 forks source link

First parentheses' color #1

Closed bounceme closed 9 years ago

bounceme commented 9 years ago

The outermost parentheses color can be sometimes very close to the color of the background when loading a new color scheme or when reloading a vim session.

junegunn commented 9 years ago

I haven't experience the problem although I don't use solarized so I'm not sure about that one. See the screenshots here: http://junegunn.kr/2014/11/rainbow-parentheses/

Anyway, I added g:rainbow#blacklist variable today, you can set it to be the list of colors you don't want to use. I also added :RainbowParenthesesColors command that can be helpful for setting it up.

  1. :RainbowParenthesesColors to see the colors chosen that are not very readable
  2. Build g:rainbow#blacklist list containing the values of ctermfg or guifg of the colors you want to exclude
  3. :RainbowParentheses to reinitialize colors
  4. Check the output of :RainbowParenthesesColors
bounceme commented 9 years ago

I think it's probably because I don't actually define my color scheme in my vimrc, but let the color persist with sessions. I'll be able to fix this for myself though so thank you

bounceme commented 9 years ago

This seems to be caused by changing to and from files with ctrlp too.

junegunn commented 9 years ago

Yeah, I can reproduce, ctrl-p seems to define a highlight group that has the same foreground color as the background. I can prevent this by setting up g:rainbow#blacklist. But I think it's better to disallow such colors in the first place.

junegunn commented 9 years ago

I updated the code so that it does not pick invisible color. Thanks.

bounceme commented 9 years ago

Nice.Thanks!