I see that the python_fold plugin for vim lets you fold
classes/functions, etc. Can someone tell me how to fold/unfold
sections? Thanks.


Search Discussions

  • Stephen at Dec 20, 2005 at 5:32 pm
    Found an earlier thread that answered my question:


    """Then zo opens the fold under the cursor one level, zO opens
    it recursively, zc and zC close it non- and recursively. zr opens all
    folds one level, zR opens them all recursively, zm closes them all one
    level, and zM closes them all recursively."""

  • Sybren Stuvel at Dec 20, 2005 at 5:41 pm

    stephen at theboulets.net enlightened us with:
    Found an earlier thread that answered my question:
    Good for you.

    I often want only one or two levels of indentation at maximum. This
    ensures not all if/while/for etc. blocks are indented. Most of my
    python files either contain classes (max indent 2) or only functions
    (max indent 1). I make sure Vim uses the correct options by adding the
    following line as the last line in the Python file:

    # vim:foldnestmax=2

    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
    Frank Zappa

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
postedDec 20, '05 at 5:14p
activeDec 20, '05 at 5:41p

2 users in discussion

Stephen: 2 posts Sybren Stuvel: 1 post



site design / logo © 2023 Grokbase