Is there any way to collapse just comments?
已回答
I know we can collapse via CTRL+SHIFT+NUMPAD +/-
But I just want to collapse comments for the native language I'm using and let the code be expanded. Is there a way? If not can we get this as a new feature?
请先登录再写评论。
Hello.
Not exactly the requested feature, but the following exists:
1. There is a command "Collapse/Expand doc comments". By default without shortcut, you can map one. It exists in Java (as soon as doc comments are recognized), but I'm not sure about every supported language.
2. There is also a setting in Code Folding section to collapse all doc comments by default, so they are collapsed on opening a file.
To find any action or setting you can use Find Action (Ctrl+Shift+A).
Regards,
Alexander.
Hello
This is cool
stp 1 : Ctrl + Shift + A
stp 2 : writh "collapse comments"
stp 3 : turn on all .
I have mapped my own shortcut to expand and collapse Doc Comments like the following way -
Now I can collapse Doc Comments with-
I click “Collapse Doc Comments”. Only triple quote comments get hidden, not line comments (#). PyCharm.
Should be a way to make this happen.