[ale] VI question

Jerald Sheets jsheets at yahoo.com
Thu May 6 16:00:31 EDT 2004


You can specify multiple joins py preceeding the jay with a number...

------------------%<snip>%----------------------
Joining Lines
Since vi does not use automatic word wrap, it is not unusual in editing
lines to end up with lines that are too short and that might be improved
if joined together. To do this, place your cursor on the first line to
be joined and type J. As with other commands, you can precede J with a
number to join multiple lines (4J joins 4 lines).
------------------%<snip>%----------------------


So then, cursoring to the first line and typing "500J" in the command
mode should do ya.  Now, if it's random throughout the file, you'll need
your %s thingie, though.

--jms



-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
Robert L. Harris
Sent: Thursday, May 06, 2004 3:54 PM
To: Atlanta Linux Enthusiasts
Subject: [ale] VI question




Ok, the problem is long solved using perl but how the heck can you use
":%s" to join multiple lines?  Yes, it can be done with "J" but we
wanted to join about 500 lines and I've done it with a substitution
before but can't remember how.

Anyone know?


:wq!
------------------------------------------------------------------------
---
Robert L. Harris                     | GPG Key ID: E344DA3B
                                         @ x-hkp://pgp.mit.edu
DISCLAIMER:
      These are MY OPINIONS ALONE.  I speak for no-one else.

With Dreams To Be A King First One Should Be A Man
					- Manowar


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004
 
    

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.676 / Virus Database: 438 - Release Date: 5/3/2004
 



More information about the Ale mailing list