Remove ^M using vi PDF Print E-mail
Written by JLangbridge   
Wednesday, 29 June 2011 13:16

Most geeks know the feeling of opening a file with vi, and becoming completely overwhelmed by the number of ^M characters in the file. I find it extremely distracting and have to get rid of them. Thankfully, there is an easy way to do this.

:%s/^M//g

To get the ^M character all you need to do is the following key combination: <ctrl>+v, <ctrl>+m

Now all the ^Ms are gone and you can concentrate on the real content of the file instead of those pesky ^M characters.

 

Add comment


Security code
Refresh