Is there any way to fold comments or make them disappear temporarily

Answered

In my source code, I have plenty of comments and sometimes it becomes difficult to follow the code because of the prolific comments that can run into several lines.
In general, I would like to keep the comments, even if they are very long, but since it becomes difficult to follow the code, I was wondering if there is any way to force the comments or make them disappear temporarily. I searched around for a plug-in but could not find anything. There is no answer on other popular forums with developers also. So I'm posting it here in the hope that someone would be able to point me in the right direction.

Thank you for any inputs stop scrolling

4 comments

Hi John,

By default PyCharm should show you folding controls on the left side of the editor:

You can also fold any selection in editor. Just select desired lines, right click --> Folding --> Fold Selection

1

Thank you for your prompt response. I guess I did not state clearly that the need actually was to have all the comments folded at once through perhaps a keyboard shortcut or even a menu item.

Folding the individual comments becomes very tedious and time-consuming and misses the point on having an IDE for development.

Thank you again and looking forward to a response.

 

0

Oh, I see now. Thank you for clarification!

Unfortunately, there is no such option at the moment. Maybe there is some 3rd party plugin for it, but I am not aware of it.

I believe it is covered by the following feature request https://youtrack.jetbrains.com/issue/PY-19306 about providing more code folding options. Please vote for it and follow for updates.

1

thank you for your prompt response. I have voted for the issue and also subscribe to it. Hopefully someone would resolve it before my death :-)

0

Please sign in to leave a comment.