Placeholder for fold
Importance: Minor
Description: Add an optional placeholder argument to the fold function, i.e. change the signature to fold(regions, <placeholder>)
and fold([regions], <placeholder>)
. If the function is executed the placeholder text is inside the yellow rectangle instead of the 3 dots.
In addition add a function is_folded(point)
, which returns whether a point is currently folded.
Motivation: This could be used to fold redundant and unnecessary code away to improve readability while keeping the key information. E.g. fold all function
keywords in JavaScript to f
or python lambda:
to λ
. In LaTeX it could be used to fold labels to l
and greek characters and some operators to their unicode character, e.g. \alpha
to α
.