Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 772 Bytes

Examples.md

File metadata and controls

32 lines (23 loc) · 772 Bytes

Custom Auto Fold Rules Examples

These are example configurations that can be used in the custom-auto-fold.rules setting.

Fold imports on Java files
{
    "fileGlob": "**/{*.java,*.class}",
    "linePattern": "^import\\s",
    "firstMatchOnly": true
},

ℹ️ - Due to limitations in the JDT, imports on *.class files are not foldable. See the extension Java Class Imports Folding for a workaround.

Fold copyright header comments on Java files
{
    "fileGlob": "**/*.class",
    "linePattern": "^(/| )\\*.*[cC](opyright|OPYRIGHT)",
    "firstMatchOnly": true
},