[英]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 中还有其他方法可以做到这一点吗?
Region folding plugin will do what you want https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder区域折叠插件会做你想要的 https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.