Hey there,
Can we update the Python Language definition in order to add folding markers for python docstrings (particularly for long function docstrings)?
Since there is an explicit beginning and end marker for these, I reckon this should be pretty easy, but I'm not sure how to add it in the face of that foldingStartMarker regex I see in the Python bundle (I have the latest one from SVN).
So, the convention (from what I understand) is this:
A long doc strings for a function looks like so: ----- python code ------- def my_function(param1, param2): """This function does xyz
There is some long documentation here ... ... ... blah blah ... .... """" # real python code here -----------------------------
So, something like adding a fold start and stop marker for """ could do the trick (the indentation levels should be the same for start and stop """ when folding is necessary).
Of course you can have this: ----------- def my_function(param1, param2): """Short docstring"""" # real python code here ----------
So I don't know if that will hose it any, but I'm guessing it would be ok since you can one-line { .. } code in languages that have brace begin/end block markers.
Thanks, -steve