简体   繁体   English

如何在 VS Code 中将一段代码分组为可折叠段

[英]How to group a section of code into a collapsible segment in VS Code

I have about 50 lines of C code that I want to collapse.我有大约 50 行 C 代码要折叠。 It's at the top-level, containing globals, typedefs, defines, etc. The only way I've figured out how to do this is by making a fake function, for example:它位于顶层,包含全局变量、类型定义、定义等。我想出如何做到这一点的唯一方法是制作一个假的 function,例如:

在此处输入图像描述

Is there another way to do this in VS Code?在 VS Code 中还有其他方法可以做到这一点吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM