问题描述
我读到了:
https://www.jetbrains.com/clion/help/folding-and-expanding-custom-blocks.html
并尝试了以下链接:
https://www.jetbrains.com/clion/help/Folding_Custom_Regions_with_Line_Comments.html
但是它似乎已损坏,因为它重定向到"Meet CLion"页面.
but it appears to be broken, since it redirects to "Meet CLion" page.
如何使用注释在CLion中定义自定义折叠区域?
How do I define custom folding regions in CLion using comments?
推荐答案
CLion基于IntelliJ IDEA,因此支持多种方式,包括:
CLion is based on IntelliJ IDEA, and thus supports multiple ways, including:
//region Description
//endregion
和
//<editor-fold desc="Description">
//</editor-fold>
通过选择要包装在区域中的代码,然后单击 + + ,可以轻松访问这些代码.您也可以通过单击菜单栏中的 Code
> Surround with ...
来访问它.
These can be easily accessed by selecting the code you wish to wrap in a region, and hitting ++. You can alternatively access it by clicking Code
> Surround with...
in the menu bar.
这篇关于如何通过注释折叠CLion中的自定义区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!