Christian Brabandt wrote on 11-8-2010 19:36:
Hi Jeri!

######### Start of text #########
if

   if

   end if

end if

if

end if
######### End of Text #########

folds into
######### Start of text #########
+--  3 lines: if

+--  6 lines: if

end if
######### End of Text #########

Notice the last end if that isnot taken into the fold.
Any idea how to fix that?

I think this matches too much because this would start a new vhdlFold Region even in lines with that contain end if.

Try something like this:
:syn region vhdlFold start='^\z(if\)' end='^end\s\+\z1' fold transparent

which limits the start and end region to match only at line start.

Yes that's true, but as in c it's not uncommon to have nested if's.
Or do you now have to include the \contain also?
I'll check how this is done in the c.vim syntax file.
There you also have nested pairs of { and }

Rgds,
Jeri

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