How to save code folding after IDE restart?
Asked Answered
E

1

12

I've tried to use code regions https://www.jetbrains.com/help/pycharm-edu/code-folding.html#surrounding_with_comments , folded some regions and restarted PyCharm.

When IDE has been restarted, all folded code regions were expanded.

How to save code folding at PyCharm restart?

For example, Visual Studio 2019 saves code folding at IDE restart.

Eiderdown answered 26/10, 2019 at 16:11 Comment(0)
C
18

For me the code folding for methods keeps persistent after restart after I activated these checkboxes "Method bodies" and "Custom folding regions". In pycharm: Settings -> Editor -> General -> Code Folding

Cancellation answered 22/2, 2020 at 9:19 Comment(1)
Tested this now with 2021.2.2. After testing with "Method bodies" and "Custom folding regions". PyCharms began remembering the folded and unfolded functions. I don't like the "Method bodies" behavior because after clicking and "OK" or deselecting and "OK" will mess with all the functions and close and open them all. "Custom folding regions" seems to be sufficient for the purpose to get PyCharm to start remembering the latest state. :shrug:Arlaarlan

© 2022 - 2024 — McMap. All rights reserved.