Article View: comp.editors
Article #58Re: The meaning of % (Re: Delete end of line conditionally in VI?)
From: DWT
Date: Tue, 03 Nov 1992 01:42
Date: Tue, 03 Nov 1992 01:42
20 lines
1501 bytes
1501 bytes
In article <Bx3Hrs.55p@sci.kun.nl> hansm@cs.kun.nl (Hans Mulder) wrote:
M> In <Bx0ACp.EAy@iat.holonet.net> [I had written]:
T> BTW, in vi escapes to ex and in ex, unlike ed, "%" is a synonym for "1,$".
M> That depends on context. When specifying a range, "%" is, as you
M> say, a synonym for "1,$". But when specifying a file name or a shell
M> command, "%" is an abbreviation for the current file name (and "#" is
M> an abbreviation for the alternate file name).
Well, ok; "1,$" can't always substitute for "%" but "%" can almost always
substitute for "1,$".
Thanks, Hans, for pointing out my careless generalization in choosing the
word "synonym". Synonymy goes both ways, and [assuming no one has named a
file "1,$"] the uses of "%" are a proper superset of those of "1,$".
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:
<Bx4A2K.Gw3@iat.holonet.net>Path:
arc1-ca.pugleaf.net!sparky!uunet!tcsi.com!iat.holonet.net!dattierReferences:
<BwwtHw.C9u@ux1.cso.uiuc.edu> <Bx0ACp.EAy@iat.holonet.net> <Bx3Hrs.55p@sci.kun.nl>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: The meaning of % (Re: Delete end of line conditionally in VI?) Message-ID: <Bx4A2K.Gw3@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: <BwwtHw.C9u@ux1.cso.uiuc.edu> <Bx0ACp.EAy@iat.holonet.net> <Bx3Hrs.55p@sci.kun.nl> Date: Tue, 3 Nov 1992 01:42:18 GMT Lines: 20