Notepad++ has commands to fold/unfold all the document. Is that possible to select some of the lines and fold/unfold only the blocks lying inside the selection?
EDIT1
Any notepad++ plugin which enables this capability?
Notepad++ has commands to fold/unfold all the document. Is that possible to select some of the lines and fold/unfold only the blocks lying inside the selection?
Any notepad++ plugin which enables this capability?
Sorry but Notepad++ don't haves that option.
It has a similar option called "Hide lines"
Hide Lines
.Instead of a + symbol you will see two blue arrows showing there are some lines hidden.
Notepad++ folding mechanism detects parts of the documents that are enclosed in braces {}
. Whatever lines are enclosed in braces can be folded and unfolded using the '+' and '-' handles on the left, next to line numbers.
You can have nested folds as well!
Ctrl-clicking a fold point (+/-) will recursively unfold/fold all blocks inside it.
Change the Language to C# or Java or JavaScript to enable collapsing comments and brackets.
Menu option: Language - C - C# (or use shortcut - Alt, L, C, C, Enter)
Then try these out:
/*hello
hello
*/
{hello
hello
}
I have discovered that, if your code blocks are folded and you hit Enter and then select Undo, NPP will unfold only the code block where the cursor is. I use this trick in macros.
Save the file as a .cs and use {} as the beginning and ending of each section you wish to collapse.