-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Non Standard Code Folding
Morgan Yarbrough edited this page Apr 25, 2015
·
4 revisions
All modes that use C style folding (C, JavaScript, CSS, etc...) (SQL Server mode also supports this) support non-standard code folding using special comment notations:
- Supported using lineComment or blockComment (blockComment is needed primarily for CSS mode)
- The pound symbol
#
is optional beforeregion
andendregion
- lineComment example:
//#region [optional description]
[code that will be folded here]
//#endregion
- blockComment example:
/*#region [optional description]*/
[code that will be folded here]
/*#endregion*/
A simpler alternative to #region
sintax is to add {
or [
at the end of line comment
// [optional description] {
[code that will be folded here]
// }
- Single line blockComments that start with 3 stars will render a fold widget that folds the comment and the code below it
/*** [section title] ***/
[code that will be folded here]
/*** [next section title] ***/