Scintilla/SciTE - Python folding

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nuff Said

    Scintilla/SciTE - Python folding

    Question:

    Is there a way to unfold a Python class *without* unfolding
    all its methods etc. so that you can get a quick overview
    of the class?

    Details:

    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).

    Thanks in advance for your answers! Nuff.

  • Neil Hodgson

    #2
    Re: Scintilla/SciTE - Python folding

    Nuff Said:
    [color=blue]
    > 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).[/color]

    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


    Comment

    Working...