Soo-Hyun Choi wrote:

Hi,

I edit C++ codes with a certain text editor under Windows XP, and then
I open the C++ codes using vi editor under FreeBSD. Then, there are
bunch of "^M" sign at the end of each line. Does anyone know why this
is happening?



Microsoft has chosen (for a long time now) to ignore the standard line feed, instead replacing "LF" with "CR/LF". There are lots of ways to deal with this. Personally, I finally just picked a 'Nix editor that grokked it and automatically converts it to "LF". I can't imagine that vi couldn't do this; but I don't use it and therefore I don't know.

But there's hope ... just a pinch of Google ... here's a freebie:

http://icarus.weber.edu/home/bob/cs213/rm_ctr_m.html


And, does anyone can tell me how to avoid this kind of
things?


Stop using Windows ;-)

HTH,

Kevin Kinsey

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to