junegunn / rainbow_parentheses.vim

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

RainbowParentheses in vimrc #13

Closed themightyoarfish closed 7 years ago

themightyoarfish commented 8 years ago

When I put RainbowParentheses (same with Limelight) at the very end of my .vimrc after let g:limelight_conceal_ctermfg = 240 I get not an editor command for both at startup, while it works when vim is already open. Why could this be?

OleMussmann commented 7 years ago

As taken from here: https://github.com/kien/rainbow_parentheses.vim you have to use au VimEnter * RainbowParentheses If I understood correctly, this uses autocommand to execute stuff when entering vim.

junegunn commented 7 years ago

@OleMussmann is correct. Vim plugins are loaded after Vim finished processing vimrc, so they are not available at the point (see :help startup). So you should set up an autocmd such as VimEnter and FileType.

themightyoarfish commented 7 years ago

Do I set these up in the .vimrc? Because if I do that, it still gives me those errors.