Manually controls how and where to fold your code
In your Settings:
"folding": {
"*": {
"begin": "{{{",
"end": "}}}"
},
"typescript": {
"begin": "#region",
"end": "#endregion"
},
"javascriptreact": [
{
"begin": "{/*",
"end": "*/}"
},
{
"begin": "<",
"end": "/>"
}
],
"php":[
{
"comment":"//"
},
{
"begin": "\/*",
"end": "*\/",
"offsetTop":1,
},
{
"begin":"<?",
"end":"?>"
},
{
"begin": "{",
"end": "}"
},
{
"begin": "[",
"end": "]"
},
{
"begin": "(",
"end": ")"
},
]
}
or with regex:
"folding": {
"*": {
"beginRegex": "\\{\\{\\{",
"endRegex": "\\}\\}\\}"
},
"typescript": {
"beginRegex": "#region",
"endRegex": "#endregion"
},
"javascriptreact": [
{
"beginRegex": "\\{/\\*",
"endRegex": "\\*/\\}"
},
{
"begin": "<",
"end": "/>"
}
],
"php":{
"comment":"//",
"beginRegex": "\\(|\\[|\\{|\\<\\?",
"endRegex": "\\}|\\]|\\)|\\?\\>"
}
}
folding.*.begin&folding.*.endmatching folding ranges using stringfolding.*.beginRegex&folding.*.endRegexmatching folding range using regular expressionsfolding.*.offsetTopshow first line when collapsedfolding.*.offsetBottomshow last line when collapsedfolding.*.commentmismatched entire line of comments using stringfolding.*.autoFixmulti-line comments fix non-matching folds
The configuration's properties begin and end should be renamed as beginRegex and endRegex.
- It's unable to remove existing folding
Enjoy!