delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/28/14:57:58

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3BB4C78C.DD8C0F29@airflash.com>
Date: Fri, 28 Sep 2001 11:55:08 -0700
From: "Alex Tang" <altitude AT airflash DOT com>
X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Chris AT Icarian DOT com
CC: kevin DOT schnitzius AT citrix DOT com, cygwin AT cygwin DOT com
Subject: Re: vim 6.0 & funny ^M
References: <D7E50C34B370D311AADC0090273B2DAE065D86AC AT messaging1 DOT icarian DOT com>

Hmmm...i'm not sure what's going on. If you save your .vimrc file as dos or
unix mode, VIM >should< be fine with it.  I've had my .vimrc file set both ways
without any problems.

When you installed cygwin, did you install the default filesystem as unix or
dos?  This could be a side-effect of installing as unix.  My installation uses
a dos default.  However, i'm pretty much guessing here, so someone with more
experience with the default file system type stuff may say i'm full of crap...

...alex...


Chris AT Icarian DOT com wrote:

> Thanks to both, what should my .vimrc file look like to set the fileformat?
>
> I tried:
>
> set fileformat=dos,unix
>
> but vim complains with the following...
>
> Error detected while processing /home/chris/.vimrc:
> line    1:
> Not an editor command: ^M
> line    2:
> Invalid argument: fileformat=dos,unix^M[~]
>
> -----Original Message-----
> From: Kevin Schnitzius [mailto:kevin DOT schnitzius AT citrix DOT com]
> Sent: Friday, September 28, 2001 11:05 AM
> To: Chris AT Icarian DOT com
> Cc: cygwin AT cygwin DOT com; 'Alex Tang'
> Subject: RE: vim 6.0 & funny ^M
>
> Alex has all the right answers.
>
> For 4) I use gsar.  Do a google search for more info.
>
> Kevin
>
>  -----Original Message-----
> From:   Alex Tang [mailto:altitude AT airflash DOT com]
> Sent:   Friday, September 28, 2001 14:02
> To:     Chris AT Icarian DOT com
> Cc:     kevin DOT schnitzius AT citrix DOT com; cygwin AT cygwin DOT com
> Subject:        Re: vim 6.0 & funny ^M
>
> Chris AT Icarian DOT com wrote:
>
> > Thanks for the reply, do you know if:
> >
> > 1) If setting fileformat="dos", will write files as dos files with
> <CR><NL>?
>
> Yes
>
> > 2) If I wanted to have the files written as unix files with the EOL as
> just
> > <NL>, fileformat should be "unix".
>
> Yes
>
> > 3) is there an easy way I can convert a file within vim from <CR><NL> to
> > <NL>
>
> If you have a file opened in "dos" mode, and you want to save it as unix
> mode,
> do "set fileformat=unix" and then save the file.
>
> You should read the VIM help on "fileformat" and "fileformats".  Basically,
> you
> should set your fileformats variable to "dos,unix".  If the fileformats
> variable
> is set, vim will try to perform automatic detection of the file type based
> on
> the first CR/NL/CRNL in the file.
>
> I think that fileformats is set properly by default in the standard VIM
> distribution, however i tweak my config pretty heavily, so i'm not fully
> sure
> about this.
>
> If all else fails, and you have a file that has a mix of <CR> and <CR><NL>,
> you
> can always do:
>
>     :%s/<Ctrl-V><Ctrl-M>//g
>
> > 4) Is there a dos2unix for cygwin &
>
> Check out the the d2u and u2d programs in the "misc" package in
> CygUtils-1.1:
> "http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/misc/index.html"
>
> Just my 2 cents...
>
> Good Luck.
>
> ...alex...
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019