JavaScript/TypeScript region folding with //region does not work
See original GitHub issue- VSCode Version: 1.30.2
- OS Version: Linux x64 4.20.0-arch1-1-ARCH
Steps to Reproduce:
- Use
//region
and//endregion
in JavaScript and/or TypeScript files to create folding regions.
Does this issue occur when all extensions are disabled?: Yes
The release notes for 1.17 mention that support was added for folding regions. For JavaScript/TypeScript, both //#region
//#endregion
and //region
//endregion
were added. However only //#region
//#endregion
seem to work. //region
//endregion
do not work.
This is annoying because some projects I work on use this syntax throughout all the code.
Code snippet
//region region
//endregion
// region region with space
// endregion
//#region #region
//#endregion
// #region #region with space
// #endregion
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:5 (1 by maintainers)
Top Results From Across the Web
JavaScript/TypeScript region folding with //region does not work
Use //region and //endregion in JavaScript and/or TypeScript files to create folding regions. Does this issue occur when all extensions are ...
Read more >Regions in TypeScript [closed] - Stack Overflow
js, while retaining intellisense, and then compiling it into one js file for your website. Regions aren't that bad in certain contexts. You...
Read more >region folding for VS Code - Visual Studio Marketplace
This extension enhances the default code folding abilities of Visual Studio Code editor. Regions of code that you'd like to be folded can...
Read more >Collapse and expand regions of code - Visual Studio (Windows)
Learn how you can use the expand and collapse commands to work in outline mode in Visual Studio.
Read more >Code Folding | IntelliJ IDEA Documentation - JetBrains
Now, when you select the Custom folding regions option, IntelliJ IDEA will fold such regions when you open your file in the editor....
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
Moved upstream to TypeScript for more feedback since we now use language aware folding. We should wait for more feedback to see if
//region
is used enough vs to//#region
to warrant support@mjbvz I just want to mention that in WebStorm // region is supported by default and // #region might be supported too as you can define custom region expressions there. I think VS Code should allow that too. That way region expression from other editors can be supported too without additional work.