I've been trying to set the foldingStartMarker and foldingStopMarker for a simplified variant of Markdown but have had no success. The file would look something like this
# First heading #
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse vel nunc. Suspendisse egestas erat vitae pede. Phasellus quis libero et tortor commodo auctor. Sed et erat. Aliquam sed lectus. Fusce semper elit nec ipsum. Morbi sem nisl, tristique id, venenatis quis, gravida sed, neque. Etiam ut felis. Curabitur leo magna, molestie vitae, blandit et, fringilla vitae, purus.
# Second heading #
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse vel nunc. Suspendisse egestas erat vitae pede. Phasellus quis libero et tortor commodo auctor. Sed et erat.
Aliquam sed lectus. Fusce semper elit nec ipsum. Morbi sem nisl, tristique id, venenatis quis, gravida sed, neque. Etiam ut felis. Curabitur leo magna, molestie vitae, blandit et, fringilla vitae, purus.
# Third heading #
etc
I'd like to fold so that only the heading lines show.
The foldingStartMarker is easy:
foldingStartMarker = '^# +';
But I can't get a foldingStopMarker that works. What I'd like to use is a blank line followed by a positive lookahead to a line that starts with a hash and a space, but
foldingStopMarker = '^$\n(?=^# +)';
doesn't work, even though that regex works in the Find dialog box.
Are the start and stop markers restricted to single line patterns? The manual suggests that, but it isn't explicit. Does anyone have any ideas?
-- Dr. Drang