如何通过注释折叠CLion中的自定义区域? [英] How to fold custom region in CLion through comments?

查看:293
本文介绍了如何通过注释折叠CLion中的自定义区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读到了:

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>

通过选择要包装在区域中的代码,然后单击 Ctrl + Alt + T ,可以轻松访问这些代码.您也可以通过单击菜单栏中的 Code > Surround with ... 来访问它.

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.

这篇关于如何通过注释折叠CLion中的自定义区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆