You and I think the same. I usually don't fold my "if" or "for" statements. I usually only fold regions.
So I'll be very happy as long as I have some sort of folding haha.
I used a double '{' and '}' in the example I gave because that's visually faster for me to make difference between a block and a region.
If you could add something in the code settings to let user decide what to use for region foldiing that would be nice.
I'm thinking of a couple different ways:
1. No special formatting for regions, just fold '{' and '}' even in the comments.
Code:
// My Region {
some_code_here();
// }
2. Instead of using '{' and '}' for folding, maybe use indentation? this way we can simply indent the code after a comment and it becomes a regions
Code:
// My region
some_code_here();
// My other region
some_other_code();
3. Usage of the visual studio style of regions
Code:
// #region My region
some_code_here();
// #endregion
4. Usage of some Intellij Idea style of regions
Code:
// <folding desc="My region">
some_code_here();
//</folding>
5. Maybe allow user-defined "string" for folding? ( provide opening and closing input in which to put it )
Code:
// My regions {fold}
some_code_here();
// {endfold}
those are all proposition. I know that if you implement only one, people won't be happy. ( I will tho! )
So maybe, like my point 5, implement a "search substring" to find fold start and fold end, ( which can only be found in comments of course )
there are probably tons of more options for folding, but those are the ones I could think as of just now.