Tuesday, May 31, 2011

Re: Syn region for VB syntax

Am 31.05.2011 10:35, schrieb Rajesh Kannan:
> G'Day,
>
> I put in the following couple of lines in vb syntax file.
>
> syn region vbSubFold start="^\c\s*\<sub\>" end="^\c\s*\<end\s*sub\>"
> transparent fold keepend
> syn region vbFunctionFold start="^\c\s*\<function\>"
> end="^\c\s*\<end\s*function\>" transparent fold keepend
>
> I set foldmethod=syntax in .vimrc and opened a vb file in vim.
> No folds were defined.
>
> Appreciate any pointers as to why this isn't working for me.
>
> --
> Kind Regards,
> Rajesh Kannan
> =============
> The best index to a person's character is
> a) how he treats people who can't do him any good and
> b) how he treats people who can't fight back.
> -- Abigail Van Buren
> =============

quick look at the $VIMRUNTIME/syntax/vb.vim file ...

"sub" and "function" are also defined with :syn-keyword,
they will take precedence over any syn-match, at least
at the very start of a line where both set of rules conflict
(your rules work with indented "sub" and "function").

--
Andy

--
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

No comments:

Post a Comment