Sean's Musings as a Service

Sean's Musings as a Service

Removing silly Windows cruft from perfectly good text files

  • Published:
  • categories: linux
  • tags: windows, linux, vim

Having Linux be my primary desktop environment is not without it’s challenges working in a large corporation of primarily Windows users, but when this even gets into how I have to treat text files I put my proverbial foot down!

When you see those nasty little ^M characters sneak into your party you can kick them out, a couple quick searches and you will probably find this or a similar global substitution pattern{{1}} that you can use inside Vim or gVim:


Just beware this is a control character so you really need to type:


Removing carriage returns from MS-DOS file