Hi Christian

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

I'm going to try this.
Thanks for the suggestion.
This is the fix I'm looking for.

This is what works for me.

syn region vhdlFold
      \ start="\z(if\)"
      \ end="end\s\+\z1"
      \ transparent fold
      \ keepend

This folds the following text:
######### Start of text #########
if

end if

if

end if

if

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

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

+--  3 lines: if

+--  3 lines: if
######### End of Text #########

When I nest one if statement into the other, it doesn't fold as I would like to see it.

The following text:
######### 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?

Best 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