Page 1 of 1
Code folding for square brackets doesn't collapse to single line
Posted: 14 Nov 2025 14:11
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 (7.18 KiB) Viewed 10208 times

- folded.png (1.16 KiB) Viewed 10208 times
Re: Code folding for square brackets doesn't collapse to single line
Posted: 19 Nov 2025 19:21
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=