Does anybody know of a method, or perhaps a plugin, 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.
Does anybody know of a method, or perhaps a plugin, that will automatically fold
Share
This is a bit of a dirty hack, but you can go through the python syntax file (
:sp $VIMRUNTIME/syntax/python.vim) and find all the syntax regions for triple-quoted strings (search for'''and""") and add thefoldkeyword to the end of those statements. Then just setfoldmethod=syntaxfor python files and the comments should be folded.