rainbow_parentheses.vim is not autostarted in new buffers

55 views
Skip to first unread message

Pierre Masci

unread,
Jul 10, 2014, 12:52:49 PM7/10/14
to vimcl...@googlegroups.com
Hi, I'm using rainbow_parentheses.vim and the options proposed in the doc to have it "always on":
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
It does work on the first file that I open,
but not on any extra other buffers that I open afterwards.

Any idea why or how to solve this?
Or even just, how to investigate?

I've tried to change a few things but without success. For instance, this doesn't work:

au BufNewFile,BufRead * RainbowParenthesesToggle au BufNewFile,BufRead * RainbowParenthesesLoadRound au BufNewFile,BufRead * echo "TEST"

even though TEST gets printed.

Pierre Masci

unread,
Jul 11, 2014, 10:26:15 AM7/11/14
to vimcl...@googlegroups.com
I forgot to mention that in a new buffer, the rainbow is activated when I do 

    :RainbowParenthesesLoadRound

Pierre Masci

unread,
Jul 11, 2014, 2:24:19 PM7/11/14
to vimcl...@googlegroups.com
PPS: I'm posting here because it is not possible to open an issue on rainbow_parentheses.vim's github; where the author hasn't been for a year.

Pierre Masci

unread,
Aug 7, 2014, 3:29:12 PM8/7/14
to vimcl...@googlegroups.com
If anyone encounters the same problem, I "solved" it by creating this mapping:

map !r :RainbowParenthesesActivate<CR> :RainbowParenthesesLoadRound<CR> :RainbowParenthesesLoadBraces<CR> :RainbowParenthesesLoadSquare<CR>

This way, I can activate rainbow parentheses with !r

It's not perfect but it's good enough for now.

Reply all
Reply to author
Forward
0 new messages