Closed odjhey closed 5 years ago
Hi, I'm not sure how it can be done in a textmate bundle, but pull requests are welcome
Folding is based on these lines:
<key>foldingStartMarker</key>
<string>/\*\*|\{\s*$</string>
<key>foldingStopMarker</key>
<string>\*\*/|^\s*\}</string>
Since ABAP doesn't use /** or {, I assume they are leftovers from some sort of sample grammar. I guess they could be changed since they are useless, but I would be against adding something like #region since is not part of ABAP. Folding for methods/classes/control blocks could be useful.
Another question is whether editors actually support this. Vscode doesn't respect the markers at all and does its own thing (and does it better, for example it folds function calls which the grammar isn't even aware of):
Edit: Not really that relevant since this is a general purpose grammar, but I figured out the vscode folding system. It's based on indentation:
add Region folding