[PLUG] To the VI Question

Jason Dagit dagit at engr.orst.edu
Mon Jul 15 20:06:33 UTC 2002


How do I find out the version of vi that I am using?

I can't find the command line switch.  So I tried :version and it says:
HP Version R  Oct 27 2000 00:57:16 $

I find HP-UX to be odd.  Not to be rude to HP, but I feel like HP-UX is
the worst version of UNIX I have ever seen.

Oh well...
Jason

On Mon, 15 Jul 2002, Stafford A. Rau wrote:

> * 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
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>





More information about the PLUG mailing list