zokugun / vscode-explicit-folding

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

When beginRegex and endRegex are the same only a portion of blocks are foldable #43

Closed h1pstah closed 3 years ago

h1pstah commented 3 years ago

Example: Interactive Python in VSCode uses #%% to denote cells. I want to collapse the individual cells without needing to define a character sequence denoting its end.

I tried : "python": { "beginRegex": "#%%", "endRegex": "#%%", "foldLastLine": false }

What happens: Certain cells are uncollapsible (it looked like it's every other one but not quite)

daiyam commented 3 years ago

For code cells, you should use:

"python": [
  {
    "separatorRegex": "#\\s*%%"
  },
],
h1pstah commented 3 years ago

Thanks :) !