views:

58

answers:

2

I'm on Ubuntu Linux 10.04. I use vim for most of my development and CodeBlocks for debugging. When I first moved from Windows to Linux, I noticed that vim was showing ^Ms for newlines, and found out that this was a Microsoft thing. However, even after removing them I notice that they sometimes reappear in files (files that I edit in CodeBlocks I think?).

Am I analyzing this correctly? How can I fix this behavior?

+1  A: 

Those are indeed caused by windows-style ends of lines.
For more informations, see, for example : php \r and \n same thing?

The only way to avoid that problem is to configure your editor / IDE so it uses linux-style ends of lines -- all modern / complete IDE provide a way to configure that ; I suppose CodeBlocks does too...

Pascal MARTIN
A: 

You may want to do dos2unix on all those files which have been edited on the windows machines.

Praveen S