[PLUG] To the VI Question

Jason Dagit dagit at engr.orst.edu
Mon Jul 15 19:55:27 UTC 2002


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

On Mon, 15 Jul 2002, Dan Young wrote:

> Did you get the slash before the n? "\n" is the newline character.
>
> :%s/\n/,/
> 	#correct
>
> worked for me on the list you gave. Whereas:
>
> :%s/n/,/
> 	#incorrect
>
> would replace "n" w/ "," like you mentioned.
>
> -Dan Young
> -Parkrose School District
>
> Matt Alexander wrote:
> > Hmmm...  that just replaced all the letter n's with a comma.
> >
> >
> > On Mon, 15 Jul 2002, Jason Dagit wrote:
> >
> >
> >>I deleted the email so quick that I can't reply, but here how I did it:
> >>
> >>:%s/\n/, /
> >>or
> >>:%s/\n/,/
> >>
> >>depends on if you want the extra space.
> >>
> >>The idea is that %s is the whole file, \n is the end of line.
> >>
> >>I hope this helps.
> >>Jason
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>





More information about the PLUG mailing list