zokugun / vscode-explicit-folding

Customize your Folding for Visual Studio Code
MIT License
103 stars 14 forks source link

Is possible to fold things in the same line? #83

Closed derricck closed 2 years ago

derricck commented 2 years ago

Example: https://stackoverflow.com/questions/72244103/possible-to-collapse-custom-regions

daiyam commented 2 years ago

Visual Studio Code doesn't support folding a single line.

derricck commented 2 years ago

@daiyam how i could match this using explicit folding?

"|<SKIP>shy[733,465,36,10][725,468,64,26]*"
 . "38$36.7VkUy67DDllsyDDllwSDU"

the intention is to fold everything after * until the last " in the next line.

I tried

          {
            "beginRegex": "]\\*.*",
            "endRegex": "\\""
          },

also

"beginRegex": "]\\*.*\\n",

daiyam commented 2 years ago

I would try:

{
  "beginRegex": "]\\*.*$",
  "endRegex": "\\"$"
},

\n isn't recognized. The document parser is line-based. (cf https://github.com/zokugun/vscode-explicit-folding#faq)

You should also enable the debug https://github.com/zokugun/vscode-explicit-folding#debugging

Good luck ;)

derricck commented 2 years ago

Is possible to hide the gutter icon for a specific rule?

daiyam commented 2 years ago

I don't think so...

derricck commented 2 years ago

Thanks for the help, i was able to get things working!