From owner-freebsd-questions@FreeBSD.ORG Sat Aug 28 00:25:17 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2412616A4CE for ; Sat, 28 Aug 2004 00:25:17 +0000 (GMT) Received: from ns1.tiadon.com (SMTP.tiadon.com [69.27.132.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE70643D58 for ; Sat, 28 Aug 2004 00:25:16 +0000 (GMT) (envelope-from kdk@daleco.biz) Received: from [69.27.131.0] ([69.27.131.0]) by ns1.tiadon.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 27 Aug 2004 19:28:51 -0500 Message-ID: <412FD0EA.6010105@daleco.biz> Date: Fri, 27 Aug 2004 19:25:14 -0500 From: "Kevin D. Kinsey, DaleCo, S.P." User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040712 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Soo-Hyun Choi References: <34b425c50408271652314776b1@mail.gmail.com> In-Reply-To: <34b425c50408271652314776b1@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Aug 2004 00:28:52.0508 (UTC) FILETIME=[FEBDBDC0:01C48C95] cc: freebsd-questions@freebsd.org Subject: Re: vi editor related question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2004 00:25:17 -0000 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