Ok… So we’ve got a LOT of code that looks similar to the following pattern – which is required for some re-use we’re doing and this sort of thing really confuses Sublime’s code folding system to the point where you can’t fold up an entire function when it’s got one or more comment sections like this where comments go to the far left edge – Sublime assumes this indicates the start of a new function/method…
/////////////////////////////////////////////////////////////////////////////////////////
//
// Method: Initialize
//
/////////////////////////////////////////////////////////////////////////////////////////
void MyCoolClass::Initialize()
{
if (foo == Types::BAR)
{
////////////////////////// BEGIN CODE REPLACE ///////////////////
// AnOldLineOfCode();
ANewLineOfCode();
////////////////////////// END CODE REPLACE /////////////////////
… more statements…
}
… more statements…
}
So, Sublime puts a folding carat at the Initialize() method and another one as expected at the ‘if’… However, if you ask it to fold up the entire method, it will only fold up to the “BEGIN CODE REPLACE” and the rest remains unfolded. Would it be possible to have it be a bit smarter about the code content and not stop folding (in this case) until it sees the matching closing brace at the bottom? I realize we do things a bit different but this seems like a bug IMHO. Anyone else notice anything like this?