Remove ^M characters at end of lines in vim

Remove ^M characters at end of lines in vim

To remove the ^M characters at the end of all lines in vim, use:

:%s/^V^M//g

The ^v is a CONTROL-V character and ^m is a CONTROL-M. When you type this, it will look like:

:%s/^M//g

May 29, 2018