[lug] Adding newline in vi
Hugh Brown
hugh at vecna.com
Sat Aug 18 09:09:18 MDT 2001
:%s/N/^M/g
where ^M is generated by typing Ctrl-V <Enter> or by Ctrl-V Ctrl-M
Hugh
"John Starkey"
>
> Hello.
>
> I need to add a newline, or want to, in vi at a common spot (same character each time). Not sure what to feed it using substitute.
>
> I tried:
>
> :%s/N/\nN/g
>
> But well.... :}
>
> I've got a file that's a one liner but should be about 500.
>
> Anyone know how to do this?
>
> TIA,
>
> John
>
> --
> John Starkey
> ColoradoParks.net
> Advance Creations
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>
------------------------------------
System Administrator/Unix Consultant
hugh at vecna.com
Vecna Technologies, Inc
6525 Belcrest Rd, Suite 612
Hyattsville MD, 20782
301.864.7253
http://www.vecna.com
More information about the LUG
mailing list