def foo(x, y):
r'''Explanation of function::
>>> foo(7, 8)
...
Return something.
'''
...
... to this ...
def foo(x, y):
r'''Explanation of function:
::
>>> foo(7, 8)
...
Return something.
'''
...
... using Vim substitution.
The command ...
:%s/\(\s*\)\(.*\w\)\(::\)$/\1\2:\r\r\1::/g
... will do the trick.
No comments:
Post a Comment