469,293 Members | 1,335 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,293 developers. It's quick & easy.

gvim: doc string editing

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

Feb 11 '07 #1
2 1276
On 2007-02-11, jm*******@no.spam.gmail.com <jm*******@gmail.comwrote:
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
Feb 11 '07 #2
On Feb 11, 7:01 pm, Neil Cerutti <horp...@yahoo.comwrote:
On 2007-02-11, jm.sur...@no.spam.gmail.com <jm.sur...@gmail.comwrote:
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
gq works great. Thanks.
-
Suresh

Feb 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by pygeek | last post: by
6 posts views Thread by manders2k | last post: by
3 posts views Thread by Shimon Sim | last post: by
6 posts views Thread by MackS | last post: by
23 posts views Thread by metaosp | last post: by
232 posts views Thread by robert maas, see http://tinyurl.com/uh3t | last post: by
reply views Thread by ee0jmt | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.