Bill H wrote:If you have a collection of small classes in a single file
Good point, hadn't thought of that. It would be useful.
And one other "common" (for certain sub-groups of people) use-case for code folding: Places where you're interfacing one computer languange to another. I beleive the PHP interpreter's code base makes a lot of use of folding to hide a lot of the "cruft" involved with "transparently" converting the internal representaions of variables into the arguements expected by the underlying C library functions, etc.
At work we have a python application that we commonly extend with custom C code. There's some very repetitive/boring template code for handling the conversion of multiple returns to extra reference parameters so that the compiler is happy. In many cases this template code is pre-generated by the compiler and automatically "fixed" if manually editted, etc. However, normally we don't need to look at it, so if its folded away it makes life easier.
Expanding on my documentation comment too -- at work, and other places, I've seen people embedding even more than normal "DocBlock" upto and including extended tutorials into the code documentation. The build process also creates a complete web and print reference manual. (Significantly more involved than phpDocumentor's tutorial support).... The amazing thing... the developers actually are keeping the documentation in sync!)
Yes, it is VERY easy to abuse, once you get used to it. Ie in the common self-submitting form that a lot of PHP writers use, having the form handler in one folding block and the page display in another. For all but the simplest, its likely better to have better functional/object decomposition.