Sometimes I get annoying ^M chars when opening files using Vim – obviously it’s a DOS EOL which mixes the picture.

The good place to seek for fixes and workarounds is Vim Wikia, which not only shows you what to do, but also gives you a brief background on what is going on (if you are unaware).

I am generally happy with dos2unix utility to convert files, but sometimes it seems to be unable to fix the issue. In such situations I do a simple search/replace, right inside of Vim (in ex mode):

Read the rest of this entry

,