Collapse all functions in Outline section of VS Code

Is it possible to collapse all functions in the Outline section, like you would do with the folders in the Explorer?

Currently, every function has underneath it its parameters and local variables. I can collapse each function manually, but I have too many to do this, and I have to do it everytime I open VS Code.

You can set the outline to collapse by default by adding "outline.collapseItems": "alwaysCollapse" to your settings.json file [Ctrl + P and search Open User Settings] or by choosing alwaysCollapse in the Outline:Collapse Items dropdown in the settings interface [Ctrl + ,].

You can collapse the outline by clicking on the icon next to the three points or by clicking on an outline element and pressing Ctrl + left key.
image

1 Like

Thank you!