In a large PHP application, I would like to collapse all the code blocks inside my current block, but not the current block itself. For instance:
if ($something) {
if ($another) {
// some code;
}
| <--THIS IS MY CURRENT CURSOR POSITION
if ($yetAnother) {
// more code;
}
if ($stillAnother) {
// yet more code;
}
}
How can I collapse the three inner ifs but not the outer if?
Thanks!
The closest thing I can come up with is zMzv. That will close all folds (zM) and then open just enough folds to view the line your cursor is on (zv). You can map that to a shorter command if necessary.
It’s not exactly what you asked for, since it will close all folds outside of your outer
ifstatement as well.