gvim: doc string editing

J

jm.suresh

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.

-
Suresh
 
N

Neil Cerutti

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.
 
J

jm.suresh

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.

gq works great. Thanks.
-
Suresh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top