Using Visual Studio Code with the Explicit Folding extension, I am trying to configure it so that the text is folded according to chapters, subchapters, ... in Org-mode files.

The Org-mode syntax for the text would be:

* Level 1 chapter

Text 1

** Level 2 chapter

Text 2

*** Level 3 chapter

Text 3


So there are tags that indicate the beginning of a block (*, **, ***), but the end of it is implicit.

How can I write the setting.json configuration file so that I get the behaviour I need?

All I could do so far is:

    "editor.showFoldingControls": "always",
    "explicitFolding.rules": {
        "org": [
                "begin": "* ",
                "end": "#*"
    "explicitFolding.autoFold": "all",
    "explicitFolding.debug": true

This works correctly, but it needs the closing "#*" tag in the text. Without it I get nothing.

Is there a way to achieve this with this approach? Is there another way?

1 Answer 1


I found the reason of the issue. The Explicit Folding extension is working fine, the problem is that I also had an old version of the Org Mode extension (by "vscode-org-mode"). Updating this from version 0.5 to version 1.0 solved my problem.

Now the text folds correctly without the need of a closing tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.