UPDATE: I've got a workaround that seems A-1 (just not sure about impact on compiled code ...); see later in this thread.
Hello,
If SpiderBasic already has a feature that does this kind of thing, please let me know !
I love (LOVE!) folding/collapsible source code.
Would it be possible to add "Block" and "EndBlock" keywords (or something similar) to allow folding of a block of code ?
I'm thinking the compiler could simply ignore these keywords (i.e. the sole purpose of the keywords: visually folding/unfolding blocks of code).
For example: image
Cheers and best regards !
"Block" and "EndBlock" keywords to fold "blocks" of code
"Block" and "EndBlock" keywords to fold "blocks" of code
Last edited by Charlie on Sun Feb 03, 2019 5:54 am, edited 2 times in total.
Huge fan of SpiderBasic, and very passionate about these other personal projects:
- Intertwingularity Slice'n Dice (Blog) and Wiki
- Le P'tit Aurèle (un lexique du français acadien / a lexicon of Acadian French)
Re: "Block" and "EndBlock" keywords to fold "blocks" of code
Here I am, traveling through time to add this feature back in SB 1.00!
And if it's not enough, you can customize folding with keywords in Preferences > Folding
Code: Select all
;{ FOOOOOOLDING!
;}
Re: "Block" and "EndBlock" keywords to fold "blocks" of code
I was playing around with preferences, happily adding If / EndIf keywords, which is really awesome.
I just went back in and added ";Block" and ";EndBlock", and that works A-1. Thanks !
I just went back in and added ";Block" and ";EndBlock", and that works A-1. Thanks !
- Yup, I had not clued in that we could have "commented text" as keywords
- The ";)" and ";)" would have been great hints if I had not been overthinking things (I.e. I was thinking they were some kind of special compiler things; face-palm moment)
Huge fan of SpiderBasic, and very passionate about these other personal projects:
- Intertwingularity Slice'n Dice (Blog) and Wiki
- Le P'tit Aurèle (un lexique du français acadien / a lexicon of Acadian French)
My workaround
Just because I find it easier for these old eyeballs to distinguish blocks of folded code from comments: image
- Block.i and EndBlock.i : the start and end wrappers for a block of code, setup as variables so they don't cause compilation errors
- Block and EndBlock: setup as custom keywords and added as folding start/end keywords
Huge fan of SpiderBasic, and very passionate about these other personal projects:
- Intertwingularity Slice'n Dice (Blog) and Wiki
- Le P'tit Aurèle (un lexique du français acadien / a lexicon of Acadian French)