[PLUG] To the VI Question
Stafford A. Rau
srau at rauhaus.org
Mon Jul 15 19:49:40 UTC 2002
* Jason Dagit <dagit at engr.orst.edu> [020715 12:45]:
> I checked it on an HP-UX box...if I use vim then it works as advertised.
> If I use vi then it doesn't work. In fact in vi you can't use %, you have
> to type 1,$.
>
> Anyone know how to specify the newline in vi?
>
> Jason
I'm suprised the "%" doesn't work in vi on your HP box - they must be
using a very very old version.
You could try the control-v trick:
:1,$s/ctrl-v<enter>/,/
The control-v is a quote mechanism in (some versions of) vi, as in
insert the next character in this search string rather than process it
immediately. In the above example, type control-v then hit your enter
key, so don't type out the brackets or anything like that.
--Stafford
More information about the PLUG
mailing list