Code folder with Emacs

Michael Wieher michael.wieher at gmail.com
Thu Mar 20 17:37:46 EDT 2008


I don't use emucks, but in vim its very simple.

:set foldmethod=indent

and instantly anything indented (ie: all python blocks) are folded.

to unfold a fold
zo
to close an opened fold
zc

that outta be enough to get any fellow vim-heads going =)

2008/3/20, Grant Edwards <grante at visi.com>:
>
> Has anybody figured out how to do code folding of Python source
> files in emacs?
>
> I tried "hide-show" minor mode, but it doesn't really work for
> Python code: the only think it knows how to hide/show are
> function bodies.  It can't do normal things like hide/show a
> code block like it can for other languages.
>
> Google also found my "folding mode", but that's based on
> user-inserted tokens and isn't syntax aware.
>
> --
> Grant
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080320/586f907e/attachment-0001.html>


More information about the Python-list mailing list