[lug] Adding newline in vi

John Starkey jstarkey at advancecreations.com
Sat Aug 18 16:55:44 MDT 2001

> :%s/N/^M/g
> where ^M is generated by typing Ctrl-V <Enter> or by Ctrl-V Ctrl-M

Now I'm really confused. Six months ago you guys showed me how to get rid of the ^M chars in a doc using vi (doing the reverse of the above). I thought they were the CR/LF chars from MS docs. 

Why would deleting them from a document (when they are visable) have no effect on the returns but adding them would? And why would they only be visible half the time? Is vi seeing them as MS CR/LF and interpretting them as returns but not using them, just showing them so you are aware they exist? 



John Starkey
Advance Creations

More information about the LUG mailing list