I will have a python package coming up soon, so now I am starting to slowly add docstrings to files using vim. So for a function like
def foo(x, y, z=None, **kwargs):
I need to manually dial the following repeatability all day long
""" foo does this stuff.
Parameters
----------
x:
y:
z: optional
kwargs:
Returns
-------
"""
Is there a way to dynamically generate this docstring pattern by defining some vim macros (which I don't know anything about, so a suggestion on how to get started would be great). Thanks.
source
share