Is there a way in a huge python file , you just see the function def you are interested in ? I remember Eclipse has an option to do this in Java and it was pretty helpful.How about for Python in PyDev/Aptana Studio 3?
-
Yes , but such that in window you just have that function not others when you scroll up and down. – Jul 14 '11 at 23:33
2 Answers
Look in Window > Preferences > PyDev > Editor > Code Folding. Enable Folding for Function Definitions. Then hit Ctrl-9
and Ctrl-0
to fold and unfold your code.
Edit: You can also use Ctrl--
(minus) and Ctrl-=
to fold and unfold single levels.

- 5,996
- 2
- 32
- 39
-
Thanks.But this folds and unfolds all the definitions.I just want to unfold and view one.I know I can hit + in the bar right int the frame , but there was a way that you could hide all others.So you could just browse that special function of your interest. – Jul 14 '11 at 23:32
-
As far as I know, there isn't a way to "fold everything else", but you can hit `Ctrl-9` then `Ctrl-=` on your definition to show only that one. – TorelTwiddler Jul 14 '11 at 23:38
What you can do is use the regular outline (Alt+Shift+Q O) with a filter.
In case you can't really make a filter with just the functions you want, you can add comments to your code in the format: "#--- comment" and those comments should then appear in the outline and then do a filter that leaves only those comments available.
Note that sometimes the quick outline is already good enough (Ctrl+O), but it currently doesn't show those comments as the regular outline.
Another solution could be using bookmarks -- ctrl+F10, add bookmark -- there are tips for using the bookmarks properly at: How to navigate to a bookmark in eclipse 3.4.1?

- 1
- 1

- 24,814
- 4
- 66
- 78