junegunn / rainbow_parentheses.vim

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

Error with .cfg file #6

Closed DavidGamba closed 9 years ago

DavidGamba commented 9 years ago

When using a file with extension .cfg and neovim's default colorscheme I get the following error:

rainbow-error

Is there a way to avoid these errors? A fallback to no color instead of a warning?

I was starting rainbow parentheses by using:

Plug 'junegunn/rainbow_parentheses.vim'
autocmd VimEnter * RainbowParentheses
let g:rainbow#pairs = [['(', ')'], ['[', ']']]

but now I have this to avoid it:

Plug 'junegunn/rainbow_parentheses.vim'
let rainbow_blacklist = ['cfg']
autocmd VimEnter * if index(rainbow_blacklist, &ft) < 0 | RainbowParentheses
let g:rainbow#pairs = [['(', ')'], ['[', ']']]

Thanks!

junegunn commented 9 years ago

Interesting, it also happens with Vim. I'll look into it.

junegunn commented 9 years ago

It should be fixed now, let me know if you still see the errors. Thanks.

DavidGamba commented 9 years ago

Wow, that was fast! thanks :-) It works now :+1: