Scintilla/SciTE - Python folding

Neil Hodgson nhodgson at bigpond.net.au
Thu Apr 29 07:10:10 EDT 2004


Nuff Said:

> I normally open a file either with 'fold.on.open=1' set in
> the user's options file resp. I use 'toggle all folds' from
> the menu to fold everything in an unfolded file.
> But then, when I  unfold e.g. a class, everything inside the
> class gets unfolded, too. What I would need is something like
> 'unfold one level only'. Thought, that maybe the keystroke
> 'Ctrl-Keypad*' was meant for that, but it doesn't work that way.
>
> I am using Scintilla/SciTE 1.59 (Linux / compiled from the
> sources).

   There is currently no support for this in SciTE. Scintilla doesn't
implement the 'policy' layer of folding although most containers have copied
SciTE's commands (fold click, fold ctrl click and fold ctrl shift click).
The toggle all folds really only toggles the top level folds. If you want to
fold a class completely, from the unfolded state: fold ctrl click. Then you
can uncover one layer with fold click.

   There are lots of folding command variants that may be interesting, but
many of the ones that sound useful seem both language and context sensitive:
for example, a command for python that folds away function and method
bodies, but leaves those bodies unfolded internally so they can be viewed
with a single click.

   Neil





More information about the Python-list mailing list