https://stackoverflow.com/questions/25135328/how-do-i-make-pycharm-stop-hiding-unfold-my-python-imports

As this question may be useful for people who also are not looking for the term "code folding", I'll make my comment an answer.

As extracted from IntelliJ IDE Web Help, but also worked on PyCharm CE 3.4.1:

  1. Open the IDE Settings (File > Settings, or Ctrl+Alt+S).
  2. Under the "Editor" node, click "General" and then "Code Folding". The "Code Folding" page is displayed.
  3. In the "Collapse by default list", select the check boxes to the left of the code constructs you want to be displayed collapsed. So here you can uncheck "Imports".
  4. Apply changes.

The image below shows what it looks like:

---------------------------------------------------- 

Updated

File -> Setting -> Editor -> General -> Code Folding -> at 'Fold by default', uncheck 'Imports'

 

 

 

 

 
Posted by uniqueone
,