I'm new to PyCharm tool and trying to figure out the rule about auto-generated code-folding blocks of comments in PyCharm (2020.2.1, Community Edition Build PC#202.6948.78).
Screenshot of my code: How can I show the code blocker in (A) instead of (B)?
In the screenshot, the code blocker appears in (B) which does not help organizing code view. I'd like it to appear in (A).
For this, I tried:
Would anyone please provide me with some rule about when the comment folding starts and ends so that I simply follow the rule in my coding and set the default code-folding setting to reduce the visible part of my source code?
Thank you in advance.
You have different options:
#%%
or # In[]
for dividing python code into different sections;#<editor-fold desc="The content to show">
print('Hello World')
#</editor-fold>
For folding code, you could use Code - Folding - Collapse All
. You could also use shortcut which is showing in the menu which is Command Shift -
for macOS.