Reputation: 412
How do I modify the java language definition bundle foldingStartMarker and foldingStopMarker entries to allow for folding of these types of comment blocks?
This is the comment style:
/** * This is a comment... * Yet another comment... */
I've tried this:
foldingStartMarker = '(\{\s*(//.*)?$|^\s*// \{\{\{|^\s*\/\*\*)'; foldingStopMarker = '^\s*(\}|// \}\}\}$|\*\/)';
I get the first match for '/**' characters, but I can't get it to find the StopMarker '*/'.
Thanks!
Upvotes: 1
Views: 736
Reputation: 2248
Cannot be done at the moment. Documented textmate behaviour, folding start and stop must have exactly the same indention level. Use the **/ workaround.
Upvotes: 0
Reputation: 2332
This works for me (in Javascript language):
foldingStartMarker = '^\s*\/\*';
foldingStopMarker = '\s*\*\/$';
Upvotes: 1
Reputation: 3714
Same problem here (custom language, but same comment block style). It seems that the foldingStopMarker
never works on lines starting with a whitespace.
I tried many combinations and whenever the line does start with a whitespace, I was unable to build a foldingStopMarker
regex that would match it, independent of the other characters in that line.
Seems like a bug.
Upvotes: 0