473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 1327
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: pygeek | last post by:
Hello everyone. I have some problems regarding gvim and Python. I have gvim 6.2 running under WinXP, with Python mode feature included during compilation . Whenever I try to use gvim's python...
6
by: manders2k | last post by:
Hi all -- I'm contemplating the idea of writing a simple emacs-like editor in python (for fun and the experience of doing so). In reading through Craig Finseth's "The Craft of Text Editing": ...
1
by: Srini | last post by:
Hi, I am working on a project and a portion of which involves receiving xml files on internet, extract values to build a string and pass that string to legacy system. I am planning on using...
3
by: AMT2K5 | last post by:
Hello, I have an assignment to do in class which requires me to create a single line editor not a multi-line editor. I am confused about what this means, I would appreciate any clarification....
3
by: Shimon Sim | last post by:
I have control. One of the properties is implemented as StringCollection. I didn't use any Editor attribute for it. During Design time system shows dialog similar to Items in DropDownList but Add...
6
by: MackS | last post by:
Hello everyone I am faced with the following problem. For the first time I've asked myself "might this actually be easier to code in C rather than in python?", and I am not looking at device...
23
by: metaosp | last post by:
Hi, in the following code: string foo("foo"); foo.resize(10); foo.append("bar"); cout << foo << endl; // output is "foo" I expect the output to be "foobar", although "bar" is also
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
0
by: ee0jmt | last post by:
Hopefully an easy question: Using vb.net I have opened an xml file (which is encrypted) retreived the file information as a string, carry out some editing of the xml data. I now want to produce a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.