How to fold custom region in CLion through comments?

拥有回忆 提交于 2021-02-08 15:12:37

问题


I read this:

https://www.jetbrains.com/clion/help/folding-and-expanding-custom-blocks.html

and tried following this link:

https://www.jetbrains.com/clion/help/Folding_Custom_Regions_with_Line_Comments.html

but it appears to be broken, since it redirects to "Meet CLion" page.

How do I define custom folding regions in CLion using comments?


回答1:


CLion is based on IntelliJ IDEA, and thus supports multiple ways, including:

//region Description
//endregion

and

//<editor-fold desc="Description">
//</editor-fold>

These can be easily accessed by selecting the code you wish to wrap in a region, and hitting Ctrl+Alt+T. You can alternatively access it by clicking Code > Surround with... in the menu bar.



来源:https://stackoverflow.com/questions/35995741/how-to-fold-custom-region-in-clion-through-comments

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!