Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

notepad++ user defined regions with folding

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 trace 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; 

How do I configure my notepad++ to display this. Is it possible? Do you have any other suggestions?

like image 845
Stephan Schielke Avatar asked Sep 21 '10 14:09

Stephan Schielke


People also ask

How do you make collapsible sections in Notepad ++?

Expand/Collapse keystrokes 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 )

Where does Notepad ++ save user defined languages?

Individual UDL files are stored in one of two userDefineLangs subfolders. Each XML file in that folder is used to define one or more UDL. <notepad++_directory>\userDefineLangs : this is the location for portable versions, or if you turned on “local configuration mode” (or disabled %AppData% ) during the installation.


2 Answers

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

like image 146
Stephan Schielke Avatar answered Oct 01 '22 12:10

Stephan Schielke


Another simple way is just to add a comment marker followed by open-block to begin a block, and a comment marker followed by end-block to end a block. In C, C++, Java, Javascript, etc. it would look like this:

//{  //} 
like image 41
Marcelo Teixeira Ruggeri Avatar answered Oct 01 '22 13:10

Marcelo Teixeira Ruggeri