gvim: doc string editing

Neil Cerutti horpner at yahoo.com
Sun Feb 11 09:01:12 EST 2007


On 2007-02-11, jm.suresh at no.spam.gmail.com <jm.suresh at gmail.com> wrote:
> Hi, I am using gvim, and am looking for a way to tell gvim to
> automatically wrap long lines into multiple lines ( by
> automatically inserting the newline character) when I edit doc
> strings. I am sure somebody must have done this.

If tw (textwidth) is set to some apposite number, then it should
just work (unfortunately, this will also cause your code to wrap
unless you set up the comment strings properly for Python).
Alternatively, you can use the gq formatting command to wrap the
comment after it is composed.

Do :h format_comments for the full dope.

-- 
Neil Cerutti



More information about the Python-list mailing list