Vim Remove ^M

I’m always needing to remove ^Ms in vim and forgetting the command - heres the details:

The stuff to type in

1
:%s/ctrlkey+v then ctrlkey+M//g

What appears in the vim command line

1
:%s/^V^M//g

Note:

  • ^Ms appear in your files after edits in Windows
  • In the comments on Google+ Kae has pointed out that you can just enter %s/ctrlkey+v then enter//g to remove the ^Ms as well