Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Oct 272010
 

How do I find and replace non-printable characters in vim?

Answer:

To replace non-printable characters in vim, e.g. get rid of ^M, you need to use the following replace method.

:%s/^M//g

Notes: The ^M above was inputted by holding down "Ctrl+v+m" at the same time.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>