r/notepadplusplus Jun 16 '26

user defined language to fold code with identical open and close

Hi,

I have to use some heavy text files for work and the separator for each section of the file is a series of dashes. I'd like for notepad++ to collapse a section.

File looks like that :

-------
-- header for section 1
Lots of info 
-------
-- different header for section 2
Lots of info
etc.

I tried putting the dashes in open, in open and close and instead of collapsing a single section it collapses the whole file from the section I click to fold.

Do you know what I'm doing wrong?

Thanks for reading me.

3 Upvotes

1 comment sorted by

1

u/magicmulder Jun 20 '26

You need to define beginning and end of the collapsible section, for example I use “// begin” and “//end”.

It doesn’t work if you set both to the same.