Thursday, December 3, 2015

Re: Highlight if-else-endif structures in Vim

On 2015-12-03, Charles E Campbell wrote:

> Try Rainbow.vim from my website:
> http://www.drchip.org/astronaut/vim/index.html#RAINBOW . It currently
> handles c, c++, matlab, Latex, javascript, and vim.

I just did that, following the link above, but ~/.vim/Rainbow.vba.gz
does not contain a rainbow.vvim file for vim. It's version 2s. The
various files have different dates, but the most recent is Dec 03,
2015, for autoload/Rainbow.vim.

Another issue is that I just executed ":Rainbow" in a C file and got
the following messages:

DechoTab(mode=1) a:0=1
"Decho Tab" [Not edited] --No lines in buffer--
Error detected while processing function Rainbow#Rainbow:
line 34:
E484: Can't open file /home/gary/.vim/before/after/syntax/c/rainbow.vvim

It looks like line 34 is trying to source that rainbow.vvim assuming
that the after directory is below the first directory in
'runtimepath'. In my case, there are several directories ahead of
~/.vim in my 'runtimepath' (newlines and spaces added for
readability):

runtimepath=~/.vim/before,
~/.vim/netrw,
~/.vim/splice,
~/.vim/vim-latex,
~/.vim/vim-bookmarks,
~/.vim/linediff,
~/.vim,
/usr/local/share/vim/vimfiles,
/usr/local/share/vim/vim74,
/usr/local/share/vim/vimfiles/after,
~/.vim/after

Couldn't you use ":runtime syntax/c/rainbow.vvim" instead of :source
there?

Here is where the Rainbow files are installed:

$ find ~/.vim -follow -iname \*rainbow\*
/home/gary/.vim/Rainbow.vba
/home/gary/.vim/after/syntax/matlab/rainbow.vvim
/home/gary/.vim/after/syntax/cpp/rainbow.vvim
/home/gary/.vim/after/syntax/tex/rainbow.vvim
/home/gary/.vim/after/syntax/lisp/rainbow.vvim
/home/gary/.vim/after/syntax/c/rainbow.vvim
/home/gary/.vim/autoload/Rainbow.vim
/home/gary/.vim/doc/Rainbow.txt
/home/gary/.vim/plugin/RainbowPlugin.vim

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment