1

I am trying to use a colorized parenthesis plugin. However, the colors don't match my current color scheme. The help page mentions ways to change the colors, but I don't know which magical words I have to use for the colors of my current color scheme. Is there some way I can call a getter in my vimrc for the colors of the color scheme applied?

let g:rainbow_conf = {
\   'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'],
\}

Something like?

let g:rainbow_conf = {
\   'guifgs': [colorscheme.getcolor(1), colorscheme.getcolor(2), colorscheme.getcolor(3), colorscheme.getcolor(4)],
\}
1

You may get the colors in effect for a particular highlight group using synIDattr:

:echo synIDattr(hlID('Normal'), 'fg')
#ffff00

Other values are bg for background, fg#, bg#, for hex color in gui, and sp (underline/undercurl). See :help synIDattr(.

  • To find possibilities for the highlight groups you can run: :so $VIMRUNTIME/syntax/hitest.vim – Hielke Walinga Apr 2 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.