Hi Jeri!

On Di, 10 Aug 2010, Jeri Raye wrote:

> Hi Christian
> 
> Thanks, but that doesn't do it for me.

Please don't top post. What exactly "does not do it" for you?

> I discovered that in a syn region the 'start value' is not allowed
> also in the 'end value'.  So in
> --->   syn region myFold2 start="foo" end="end foo;" transparent fold
> the second foo is not allowed.
> 
> Is there a way to work around this?

I am no expert in syntax highlighting. But this should be possible using 
\z() (see :h :syn-ext-match)

Something like this should work then for you:
:syn region myFOLD2 start="\z(if\)" end="end \z1" transparent fold

Or grep the VIMRUNTIME/syntax/ directory for how to use it:
:vimgrep /\\z(.\{-})/ $VIMRUNTIME/syntax/*.vim
> I'm trying to create folding parameters for VHDL.
> VHDL has a lot of such constructions. For example the "if statement"
> ends with "end if;"
> IF <some text> THEN
> ....
> END<one or more space char> IF<zero or more space char>;
> 
> 
> Question 1: Is this possible:
> let START_VALUE = "<some text or space char but not the word end,with
> a space char to separate it from> IF <some other text but not the word
> THEN>  THEN <zero or more space char>"
> let END_VALUE = "<zero or more space characters> END <with one or more
> space char> IF <zero or more space char> ; <zero or more space char>"
> Question 2: if so, how to define this?

is what possible?
> 
> Question 3: And can this then be to add something like this:
> syn region myFold2 start="START_VALUE" end="END_VALUE;" transparent fold

I don't understand your question.

regards,
Christian
-- 

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

Reply via email to