configurationnotepad++regionfolding

How to add user defined regions with folding in Notepad++?


I can't figure out how to configure Notepad++ to display regions for user defined keywords.

I have a big trace file which shows the start and the end of a procedure. The file looks like this:

Beginn abc.def;
   ...
   Beginn ghi.jkl;
   ...
   Ende ghi.jkl;
   ...
Ende abc.def;

I would like to fold those regions like this:

[+] Beginn abc.def;

or

[-] Beginn abc.def;
       ...
[+]    Beginn ghi.jkl;
       ...
    Ende abc.def;

Is it possible to configure Notepad++ to display folding like this?


Solution

  • For version 6.5.5 and above:

    Under the menu "Language" there is a menuitem called "Define your language..."

    enter image description here

    In the tab "Folder & Default" is a group called "Folding in code" where you can enter an "Open"- and a "Close"-Keyword.

    Folding in code

    For versions older than 6.5.5:

    Under the menu "View" there is a menuitem called "User-Defined Dialog..."

    View Define your language

    In the tab "Folder & Default" you can enter a "Folder Open Keyword" and a "Folder Close Keyword"

    Folder Open Close Keyword