Article View: comp.bugs.sys5
Article #809Re: bug in vi with :ab
From: Maarten Litmaath
Date: Tue, 19 Jul 1988 17:02
Date: Tue, 19 Jul 1988 17:02
34 lines
1585 bytes
1585 bytes
In article <5473@super.upenn.edu> brant@linc.cis.upenn.edu (Brant Cheikes) writes:
\Problem: Abbreviations are expanded at all levels of vi.
\This has been reproduced in both System V vi and BSD vi
\(SVR2 and 4.3BSD respectively).
\
\Reproduce: Run vi, and set an abbreviation, say :ab foo FooBaz.
\Now insert some text, anytime you type "foo", it will be replaced
\by "FooBaz". This is fine. However, you can no longer ever search
\for the string "foo", nor edit a file called "foo"--in all cases,
\"foo" is expanded first to FooBaz.
\
\SO, is this a bug? Is there some way to search for abbreviation
\strings? If a bug, is there a fix? It seems to me that abbreviations
\should ONLY be expanded while in input mode.
This is a bug indeed.
The same goes for 'map!'.
There are work-arounds however:
/foo^V.
and
/foo^V$
The first will find any occurrence of 'foo' not followed by \n,
the second will find foo at EOL.
The ^V is needed to escape the next 'breakpoint' char.
Edit next file:
:n foo^V ^J
--
I'd rather live in Russia |Maarten Litmaath @ Free U Amsterdam:
than in South-Africa... |maart@cs.vu.nl, mcvax!botter!ark!maart
Technical Details
Message-ID:
<1321@ark.cs.vu.nl>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!botter!ark.cs.vu.nl!maartReferences:
<5473@super.upenn.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!botter!ark.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.bugs.sys5,comp.bugs.4bsd Subject: Re: bug in vi with :ab Message-ID: <1321@ark.cs.vu.nl> Date: 19 Jul 88 17:02:23 GMT References: <5473@super.upenn.edu> Reply-To: maart@cs.vu.nl (Maarten Litmaath) Organization: VU Informatica, Amsterdam Lines: 34