Is there a way to fold/unfold a selected block of code in notepad++? I am aware of the shortcuts alt0 and altshift0 (Fold/unfold all), but this is not what I am looking for.

I usually start by folding all the code and then unfolding a particular method. In this scenario the individual fold/unfold shortcuts (ctrlaltf OR ctrlaltshiftf) does not come in handy, as it only works on the current (outermost) block, leaving the inner blocks folded...


There is no keyboard command that I know of, but you can use the mouse. Ctrl+click on the [+] in the left margin, and Notepad++ will expand/unfold/uncollapse that block and all its subblocks.

Conversely, Ctrl+click on a [-], and it will fold/collapse that block and all its subblocks. Real intuitive, huh?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.