Strip ^M from file in vim

If there are ^M at the end of every line when you view them in vim, you can do this:
:%s/^M//g
To get the “^M” bit, hit ctrl-v and then ctrl-m.

Share:
  • del.icio.us
  • Facebook
  • Google
  • E-mail this story to a friend!
  • Technorati
  • TwitThis

Leave a Reply