Code folding for square brackets doesn't collapse to single line

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
crtrubshaw
Posts: 393
Joined: 06 Jun 2012 11:08

Code folding for square brackets doesn't collapse to single line

Post by crtrubshaw »

Hi Rickard, with code folding if it's a block with braces then it collapses to a single line, but say you have an array literal over many lines, if you collapse it, the fold shows the closing square bracket on a second line under the top (collapsed) line. Please can you make it collapse to a single line?

Thank you.

unfolded.png
unfolded.png (7.18 KiB) Viewed 8495 times
folded.png
folded.png (1.16 KiB) Viewed 8495 times
User avatar
Rickard Johansson
Site Admin
Posts: 6908
Joined: 19 Jul 2006 14:29

Re: Code folding for square brackets doesn't collapse to single line

Post by Rickard Johansson »

This is done in the syntax file. If square brackets are not added as a fold, in the syntax file, indention is used.
Which is why the last line is not hidden (it's a standard behavior in most editors...).

You could try to add something like this:

Code: Select all

[Fold]
1_Id=
1_Begin=[
1_End=]
1_Level=nltNestedRegionIndent
1_ListItem=ceSkip
1_Name=
Post Reply