Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fold/unfold selection only in Notepad++

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?

like image 560
Eduardo Poço Avatar asked Sep 03 '16 18:09

Eduardo Poço


People also ask

How do you make collapsible sections in Notepad ++?

In a document type such as HTML or XML, you can expand or collapse an element or block via: Ctrl Alt F to collapse current level. Ctrl Alt Shift F to expand ( uncollapse current level )

How do I select a block in Notepad ++?

You can do this using the following steps. Place your cursor at the beginning position where you want to begin selecting text. Press and hold the “Shift” and “Alt” keys on your keyboard. Continue holding “Shift” and “Alt” while using the “Down” and “Right” arrow keys on your keyboard to select the text as desired.

How do you collapse JSON data in Notepad ++?

Ctrl + Alt + F collapse current level and Ctrl + Alt + Shift + F expand it. Save this answer.


2 Answers

Sorry but Notepad++ don't haves that option.

It has a similar option called "Hide lines"

  1. Select the text you want to hide
  2. Right button click
  3. Select Hide Lines.

Instead of a + symbol you will see two blue arrows showing there are some lines hidden.

like image 109
NetVicious Avatar answered Oct 09 '22 09:10

NetVicious


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!

like image 34
Pranav Avatar answered Oct 09 '22 07:10

Pranav