Handling folds in Spyder

Viewed 21752

I am coming from a VScode background , and for my recent project (on Deep Learning) I am having to manage huge code files in Spyder (Version 3), and I am not seeing any option of code folding?

I am not willing to switch to another IDE , as Spyder is very productive for my project.

Please suggest any hack to do it , if it is not there in the Spyder codebase.

3 Answers

(Spyder maintainer here) You can install the first beta of Spyder 4 to get code folding.

If you use Anaconda, you need to use the following commands:

conda update anaconda

conda update spyder

or if you use pip, then you need to run

pip install -U --pre spyder

This beta is quite stable and it has been tested for more than a year.

Spyder 4.0.1 is released, which supports code folding. If you are using anaconda, use

conda update --all

to get it.

If you want to fold more that just a loop or a function, you can also try:

#%% 

Code that you want to fold

#%%
Related