Text wrapping Python docstrings

Yannick Gingras ygingras at ygingras.net
Mon Jan 31 05:05:33 GMT 2022


Hi everyone, 
Is there an easy way to re-wrap paragraphs in Python docstrings to that
they indent to match the current block? Of example, if I have:

def foo():
    """ Foo is a really cool function.

    Something really long and verbose about foo() that I would type as
one really long line until I feel ready to move to the next paragraph.

    """

If I hit ALT-W, the text will re-wrap nicely, but the second line will
start at column 0. I would rather have it start at column 4 like this:

def foo():
    """ Foo is a really cool function.

    Something really long and verbose about foo() that I would type 
    as one really long line until I feel ready to move to the next
    paragraph.

    """

If Kate does not support that directly, would an LSP pluggin be the
easiest approach to add this?

-- 
Yannick Gingras
http://ygingras.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20220130/cc52925d/attachment.sig>


More information about the KWrite-Devel mailing list