Article View: comp.editors
Article #50Re: Delete end of line conditionally in VI?
From: DWT
Date: Sat, 31 Oct 1992 21:58
Date: Sat, 31 Oct 1992 21:58
24 lines
1218 bytes
1218 bytes
In article <BwwtHw.C9u@ux1.cso.uiuc.edu> krisk@ux1.cso.uiuc.edu (Kris
Klindworth) writes:
>Look up the global command (g). It will do what your asking for with
>a line like:
>
>:1,$g/9"/j
As long as you're specifying g there is no need to add "1,$" unless you
just adore extra keystrokes.
:g/9"/j
is enough. BTW, in vi escapes to ex and in ex, unlike ed, "%" is a synonym
for "1,$".
I would, however, recommend adding one keystroke back in:
:g/9"$/j
We don't necessarily want to join if '9"' occurs in the middle of the line.
David W. Tamkin P. O. Box 59297 Northtown Station, Illinois 60659-0297
dattier@{holonet.net|gagme.chi.il.us} CIS: 73720,1570 MCI Mail: 426-1818
Technical Details
Message-ID:
<Bx0ACp.EAy@iat.holonet.net>Path:
arc1-ca.pugleaf.net!sparky!uunet!tcsi.com!iat.holonet.net!dattierReferences:
<1992Oct29.214048.29162@massey.ac.nz> <BwwtHw.C9u@ux1.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!tcsi.com!iat.holonet.net!dattier From: dattier@orac.holonet.net (DWT) Subject: Re: Delete end of line conditionally in VI? Message-ID: <Bx0ACp.EAy@iat.holonet.net> Sender: usenet@iat.holonet.net (USENET News System) Nntp-Posting-Host: holonet.holonet.net Organization: Information Access Technologies, Inc. of Berkeley, CA References: <1992Oct29.214048.29162@massey.ac.nz> <BwwtHw.C9u@ux1.cso.uiuc.edu> Date: Sat, 31 Oct 1992 21:58:00 GMT Lines: 24