[folding] configure initial collapse state
See original GitHub issueMaybe I missed something … I recently migrated my javascript project from netbeans to visual studio code … in netbeans we use
//<editor-fold defaultstate="collapsed" desc="MySection">
...
//</editor-fold>
for defining regions … I saw I could modify javascript-language-configuration.json to
"folding": {
"markers": {
"start": "^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))",
"end": "^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))"
}
}
SO my request includes 2 questions :
- Is it possible to add the editor fold tag to the javascript language configuration (Identical as the configuration for java)
- Could a defaultstate be added to regions, so when a file is opened regions will be either collapsed or expanded
Issue Analytics
- State:
- Created 6 years ago
- Reactions:63
- Comments:26 (8 by maintainers)
Top Results From Across the Web
Code Folding | IntelliJ IDEA Documentation - JetBrains
Use this page to specify the default code folding settings. For shortcuts on how to expand or collapse code elements, refer to the...
Read more >Collapse - Bootstrap
If you've set the collapsible element to be open by default using the show class, set aria-expanded="true" on the control instead. The plugin...
Read more >Bootstrap collapse initial state - CodePen
HTML ; class · "btn btn-primary collapsed" ; data-toggle · "collapse" ; href · "#collapseExample" ; role · "button" ; aria-expanded · "false" ......
Read more >Collapse or expand parts of a document - Microsoft Support
To collapse or expand all the headings in your document, right-click the heading and click Expand/Collapse > Expand All Headings or Collapse All...
Read more >How do I collapse sections of code in Visual Studio Code for ...
There are new folding actions to collapse source code regions based on their folding level. There are actions to fold level 1 (...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would love to have import blocks automatically folded in files with a simple user setting.
Yes, you need Version: 1.59.0-insider Commit: b805d2e94937976bb17d0439f57fcd3a9d423c31 Date: 2021-07-20T05:13:38.717Z
and you need to set
"editor.foldingImportsByDefault": true
I tried it with Java and got it working. But yes, it’s not yet tested well. For now, it will be off by default. Please file separate issues.