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?
To collapse or expand all code fragments, press Ctrl+Shift+NumPad - / Ctrl+Shift+NumPad + . CLion collapses or expands all fragments within the selection, or, if nothing is selected, all fragments in the current file, for example, all methods in a file.
To fold or unfold a code fragment, press Ctrl+NumPad - / Ctrl+NumPad + . IntelliJ IDEA folds or unfolds the current code fragment, for example, a single method. To collapse or expand all code fragments, press Ctrl+Shift+NumPad - / Ctrl+Shift+NumPad + .
Go to Header/Source To invoke Go to Header/Source, press F10 or call Navigate | Header/Source from the main menu.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With