Date: Fri, 27 Aug 2004 19:25:14 -0500 From: "Kevin D. Kinsey, DaleCo, S.P." <kdk@daleco.biz> To: Soo-Hyun Choi <shchoi@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: vi editor related question Message-ID: <412FD0EA.6010105@daleco.biz> In-Reply-To: <34b425c50408271652314776b1@mail.gmail.com> References: <34b425c50408271652314776b1@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?412FD0EA.6010105>