snippets / replace ^M by new line with vim

Language: Shell - First posted by benoitc on 2007-10-12 14:36 (12 months)
Link to the snippet: http://www.friendsnippets.org/snippet/91/

tip to replace ^M by unix new line ending that appear on some file. ^ mean ctrl key.

1 :%s/^V^M/\r/g
In order to post a comment, you should have a friendsnippet account. Please sign-in.

1 comments

  • October 13th 2007 at 11:46

    You can also do it with konwert, like this:

    1 !#/bin/bash
    2 konwert lf -O file
Oct '07
  • tip to **replace ^M by unix new line ending** that appear on some file. ^ mean _ctrl key_.