🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #55

The meaning of % (Re: Delete end of line conditionally in VI?)

#55
From: Hans Mulder
Date: Mon, 02 Nov 1992 15:31
13 lines
961 bytes
In <Bx0ACp.EAy@iat.holonet.net> dattier@orac.holonet.net (DWT) writes:

>BTW, in vi escapes to ex and in ex, unlike ed, "%" is a synonym for "1,$".

That depends on context.  When specifying a range, "%" is, as you
say, a synonym for "1,$".  But when specifying a file name or a shell
command, "%" is an abbreviation for the current file name (and "#" is
an abbreviation for the alternate file name).

--
Hope this helps,

Hans Mulder			hansm@cs.kun.nl
Technical Details
Message-ID: <Bx3Hrs.55p@sci.kun.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!wn1.sci.kun.nl!cs.kun.nl!hansm
References: <1992Oct29.214048.29162@massey.ac.nz> <BwwtHw.C9u@ux1.cso.uiuc.edu> <Bx0ACp.EAy@iat.holonet.net>

Show Full Headers
Complete Article Headers
Newsgroups: comp.editors
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!wn1.sci.kun.nl!cs.kun.nl!hansm
From: hansm@cs.kun.nl (Hans Mulder)
Subject: The meaning of % (Re: Delete end of line conditionally in VI?)
Message-ID: <Bx3Hrs.55p@sci.kun.nl>
Sender: news@sci.kun.nl (NUnet News Owner)
Organization: University of Nijmegen, The Netherlands
References: <1992Oct29.214048.29162@massey.ac.nz> <BwwtHw.C9u@ux1.cso.uiuc.edu> <Bx0ACp.EAy@iat.holonet.net>
Date: Mon, 2 Nov 1992 15:31:03 GMT
Lines: 13