Each region marker must be on a separate line and start with //#.
Each marker is expected to contain a region label that is used to build the navigation tree view with the hierarchy of nested regions. Each region start marker is expected to have a corresponsing region end marker with the same region label.
You can use the following markers to define named folding regions:
Start marker
End marker
Suggested purpose
//#{*
//#*}
Data types, structures, ...
//#{
//#}
Variables, objects, instances, ...
//#[
//#]
Arrays, lists, collections, tables, mappings, ...
//#(
//#)
Functions, methods, procedures, ...
//#<
//#>
General purpose sections or regions
You can use the markers as you like, the above purpose for the folding regions is only a suggestion.
The named regions will show in the navigation tree view where you can collapse/expand the regions and navigate to them by the region label.
Headlines
You can define headlines on three levels that will show in the navigation tree view where you can navigate to them by the headline title.
Marker
Headline
//#1
Headline level 1
//#2
Headline level 2
//#3
Headline level 3
Comments in Marker Colors
You can add comments in marker colors. These comments do not appear in the navigation tree view.
Marker
Color
//-1
Headline level 1 color
//-2
Headline level 2 color
//-3
Headline level 3 color
//-{*
{* *} region color
//-{
{ } region color
//-(
( ) region color
//-[
[ ] region color
//-<
< > region color
Navigation Tree View
You can navigate faster in your code using region labels and headlines in the navigation tree view.
You build the navigation tree explicitly by defining named regions and headlines of significance.
To open the view, go to View | Open View... and search for Fold More
Supported Languages
Currently supported languages (with C-style line-comments starting with //):
JavaScript
TypeScript
Extension Settings
You can configure the marker colors for region labels and headlines in the extension settings:
Open the Settings and search for foldmore
Click on Edit settings.json to edit the styles (syntax and icon colors)