Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Eclipse (pydev) automatically fold all comments when opening a file?

Is there a way that eclipse (edit: under windows) folds all comments and docstrings automatically when I open a python file?

like image 936
Gobliins Avatar asked Aug 31 '11 08:08

Gobliins


People also ask

How to enable code Folding in Eclipse?

To enable code folding, go to the Folding Preferences page, accessible from Window | Preferences | PHP | Editor | Using Code Folding . If Code Folding is enabled, minus signs will appear in the Annotation Bar next to code blocks which can be folded.

What do the preferences in Java editor folding control?

Code Folding enables you to 'collapse', or hide, certain sections of code while you are not working on them. This enables you to manage larger amounts of code within one window.


2 Answers

By default the loop and condition folds are disabled, to enable them go to Window -> Preferences -> PyDev -> Editor -> Code Folding. Apply code folding to all entries

like image 122
Francis Avatar answered Oct 19 '22 22:10

Francis


This feature is now available in PyDev and can be enabled by going into the preferences:

PyDev > Editor > Code Folding

and then selecting what you want to fold initially.

i.e.:

PyDev folding preferences

like image 36
Fabio Zadrozny Avatar answered Oct 19 '22 23:10

Fabio Zadrozny