1

I read this answer (How do I collapse sections of code in Visual Studio Code for Windows?) and tried changing settings, extensions, etc... I still had to go back to sublime to do basic code folding. I'm on a mac. Visual studio code Version 1.30.2 (1.30.2).

Visual studio code (not working)

enter image description here

Sublime (working)

enter image description here

How do I get those little collapse buttons to show in visual studio code?

idleberg
  • 12,634
  • 7
  • 43
  • 70
Kyle Pennell
  • 5,747
  • 4
  • 52
  • 75

3 Answers3

3

To show code folding controls you need to hover between the line numbers and code. VS Code folding controls

Braca
  • 2,685
  • 17
  • 28
3

For me, it wasn't because of an extension but because of this setting:

"editor.folding": false, 

Commenting it out has solved the problem.

MagTun
  • 5,619
  • 5
  • 63
  • 104
1

Tokenization, wrapping and folding is turned off for large files in order to reduce memory usage and avoid freezing or crashing. Put this into settings.json to enable this feature:

"editor.foldingMaximumRegions": 500000, // defaults to 5000, adjust to your needs
"editor.largeFileOptimizations": false
mszan
  • 517
  • 5
  • 18