preservim / vim-indent-guides

A Vim plugin for visually displaying indent levels in code
MIT License
2.62k stars 162 forks source link

highlight group not found: Normal #115

Closed gilmrjc closed 8 years ago

gilmrjc commented 8 years ago

When I activate Indent Guides Vim throws this error

Error detected while processing function <SNR>47_IndentGuidesEnable[1]..indent_guides#enable[8]..indent_guides#init_script_vars[7]..indent_guide
s#capture_highlight:
line    2:
E411: highlight group not found: Normal

I commented the code and now it works fine.

  ""let s:hi_normal   = indent_guides#capture_highlight('Normal')

  " remove 'font=<value>' from the s:hi_normal string (only seems to happen on Vim startup in Windows)
  ""let s:hi_normal = substitute(s:hi_normal, ' font=[A-Za-z0-9:]\+', "", "")
nathanaelkane commented 8 years ago

Sounds like you're not using a colorscheme, or your colorscheme isn't defining colours for the Normal highlight group.

Try using a different colorscheme, or manually defining the indent guide colours:

let g:indent_guides_auto_colors = 0
hi IndentGuidesOdd  guibg=red   ctermbg=3
hi IndentGuidesEven guibg=green ctermbg=4

Please re-open if this is not the case.