>       :g/^component\s\+\w+/,/^end component/fold
>
>The use of regexps can give you more flexibility for nailing them down.[snip]

Yes please explain, as I get the message:
E486: Pattern not found ^component\s\+\w+

This is missing a \ before the final +, so unless your identifier is a
word character and a + character, the expression won't match. Try

:g/^component\s\+\w\+/,/^end component/fold

And I would highly recommend using this sort of regular expression for
your custom folds - you can easily end up with some very strange folds
in odd circumstances otherwise.

Cheers.

Reply via email to