Tuesday, June 22, 2010

Re: How to fold long docstrings in python source code?

On 06/22/2010 10:49 AM, Reckoner wrote:
>
> Hi,
>
> Does anybody know of a method, or perhaps a plug-in, that will
> automatically fold long docstrings in python? I have docstrings in my
> code that span several pages, so it is troublesome to keep paging
> through them. The other tricky part is that there is embedded python
> testing code in the docstrings, so that might make parsing them
> difficult. Note that I only need to automatically fold the entire
> docstring, regardless of what is in it.
>
> Thanks in advance.
>


A script that's part of my PySuite does that. You need vim compiled with
python, though. The script also folds comments and single line
docstrings, but it'd be easy to tweak it to avoid doing that if you
wish. Url is in my sig.

   -ak

--
 Python plugins for vim: outliner, todo list, project manager, calendar,
 expenses tracker, sortable table, and more |
 http://lightbird.net/pysuite/


No comments: