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

Stephen

Search Discussions

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

    http://mail.python.org/pipermail/python-list/2005-July/289078.html

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

    Stephen
  • 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

    Sybren
    --
    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 @
categoriespython
postedDec 20, '05 at 5:14p
activeDec 20, '05 at 5:41p
posts3
users2
websitepython.org

2 users in discussion

Stephen: 2 posts Sybren Stuvel: 1 post

People

Translate

site design / logo © 2022 Grokbase