public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Unix/DOS text mode?
@ 2001-11-13 12:13 Joshua
  2001-11-14  1:10 ` Corinna Vinschen
  0 siblings, 1 reply; 31+ messages in thread
From: Joshua @ 2001-11-13 12:13 UTC (permalink / raw)
  To: cygwin

    I think I'm being a bit dense on this issue for which I apologize.  What
option needs to be set to have the Cygwin-packaged vim autodetect
binary/text files and edit/save accordingly?  My .vimrc is a binary file,
BTW.  Thanks and BCNU//jle

From: Corinna Vinschen <cygwin at cygwin dot com>
To: cygwin at cygwin dot com
Date: Tue, 20 Nov 2001 16:29:20 +0100
Subject: Re: Unix/DOS text mode?
References: <000b01c171d5$8a3b4f40$2ae61718@bdfrd1.tx.home.com>

----------------------------------------------------------------------------
----

On Tue, Nov 20, 2001 at 09:10:48AM -0600, Joshua wrote:
>     Corinna,
>
>     Thanks for the enlightenment.  Regarding your statement, 'These files
> must be in binary mode on Cygwin regardless of the bin/textmode of the
> underlying mount point.', what files are you referring to?  I would
> understand if the Cygwin files, ie config files in /etc need to be binary,
> but are you saying that Cygwin needs to deal with all files (like
> /cygwin/c/autoexec.bat) in a binary mode?  Or could the vim packaged with
> Cygwin be set to autodetect the binary/text type?  My understanding of how
> vim/gvim worked was that it would detect the binary/text type and preserve
> the type when you edit save the file.  BCNU//jle

It does recognize bin/text, just not for script files as .vimrc.
These must be binmode (LF, not CRLF lineending).

Corinna

> From: Corinna Vinschen <cygwin at cygwin dot com>
> To: cygwin at cygwin dot com
> Date: Tue, 20 Nov 2001 10:28:25 +0100
> Subject: Re: Unix/DOS text mode?
> References: <000f01c17193$e7b4c6c0$2ae61718@bdfrd1.tx.home.com>
>
> --------------------------------------------------------------------------
--
> ----
>
> On Tue, Nov 20, 2001 at 01:20:59AM -0600, Joshua wrote:
> >     Hmm, I've noticed this difference between the PC version of vim/gvim
> > versus the vim that comes with cygwin.  Using the PC version, vim/gvim
> seems
> > to be able to tell whether you're opening a unix file or a PC file and
> > display/edit appropriately.
> >
> >     I tried copying my _vimrc from my PC installation to .vimrc in my
home
> > directory, but that doesn't do the trick.  I figured it was either a
> switch
> > in vimrc or something to do with the mounts themselves.  BCNU//jle
>
> The Cygwin vim has the same ability to recognize Unix/DOS files
> as the Windows native version.  After a discussion with Bram Moolenaar
> he decided not to add that recognition to the vim script files
> as .vimrc.  These files must be in binary mode on Cygwin regardless
> of the bin/textmode of the underlying mount point.
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                                mailto:cygwin@cygwin.com
> Red Hat, Inc.
>
> --
>
>
>
>
> --
> 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/

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.





--
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/

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Unix/DOS text mode?
@ 2001-11-20  6:05 AGalick
  2001-11-29 11:20 ` AGalick
  0 siblings, 1 reply; 31+ messages in thread
From: AGalick @ 2001-11-20  6:05 UTC (permalink / raw)
  To: Larry Hall (RFK Partners, Inc); +Cc: cygwin


Thanks, this worked, but I never needed a .vimrc before and
my .viminfo history/recall is only loaded if I explicitly type :rv.
I (and my boss) were fed up with me squirrelling
with it, so I shelled out $79 for a cygwin 1.0 CD at
ccpcomputersupplies.com.  They're the only place
I could find with a stable release for sale.  Either
I'm paying for being a sorry excuse of a 'puter geek,
or I'm getting a good deal to avoid being a guinea pig.

Albert



                                                                                                              
                    "Larry Hall                                                                               
                    (RFK                 To:     AGalick@attotech.com, cygwin@cygwin.com                      
                    Partners,            cc:                                                                  
                    Inc)"                Subject:     Re: Unix/DOS text mode?                                 
                    <lhall@rfk.co                                                                             
                    m>                                                                                        
                                                                                                              
                    11/19/01                                                                                  
                    04:34 PM                                                                                  
                                                                                                              
                                                                                                              



At 04:00 PM 11/19/2001, AGalick@attotech.com wrote:
>After an upgrade, I seem to have lost all sanity in vi(m).
>I used to see .txt files the same with notepad or vi, but
>now in vi every line ends with a blue ^M.  I've played
>with mount -[t|b] and tried [un and re]installing vim but I'm
>stumped.  The thing is, it seems to have also disabled all
>the nice search string history/recall (I guess because .viminfo
>also shows those damned ^M's).  What have I done
>or what has cygwin done?  I guess other stuff got upgraded,
>too, but I don't know what.


Try setting "fileformat=dos" in your .vimrc file if you always want
your files to be treated as a DOS text file.  See the help in vim for
more info.





Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX






--
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/

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Unix/DOS text mode?
@ 2001-11-15  2:55 Joshua
  2001-11-15  3:19 ` Michael Schaap
  2001-11-22 11:07 ` Joshua
  0 siblings, 2 replies; 31+ messages in thread
From: Joshua @ 2001-11-15  2:55 UTC (permalink / raw)
  To: cygwin

Corinna et al,

Strangely enough, my vim does *not* start up with the
fileformats=dos,unix option either.  However, adding
that switch to .vimrc does the trick.  I wonder where
your installation is getting that option set at? 
BCNU//jle

From: Corinna Vinschen <cygwin at cygwin dot com> 
To: cygwin <cygwin at cygwin dot com> 
Date: Wed, 21 Nov 2001 11:16:43 +0100 
Subject: Re: Unix/DOS text mode? 
References:
<20011121102822.E21630@cygbert.vinschen.de>
<Pine.GSO.4.40.0111211032100.1160-100000@domino.informatik.uni-kl.de>


--------------------------------------------------------------------------------

On Wed, Nov 21, 2001 at 10:43:29AM +0100, Bjoern Kahl
AG Resy wrote:
> 
>  Hallo !
> 
> On Wed, 21 Nov 2001, Corinna Vinschen wrote:
> 
> On Tue, Nov 20, 2001 at 07:54:47PM -0600, Joshua
wrote:
> > >     I think I'm being a bit dense on this issue
for which I apologize.  What
> > > option needs to be set to have the
Cygwin-packaged vim autodetect
> > > binary/text files and edit/save accordingly?  My
.vimrc is a binary file,
> 
> > Nothing.  It should work automagically.  Which it
does on my system.
> > I've just tested it explicitely since your
postings made me nervous.
> 
>  Hmm. At least for the version I installed last
friday (using
>  "install now" (aka setup) on the cygwin site) did
*not* work.
>  I have had to copy
"/usr/share/vimv/im60/vimrc_example" as
>  ".vimrc" to my $HOME and add the line "set
fileformats=unix,dos"
>  under the line "set nocompatible".

Interesting.  I have no such option set explicitely. 
When opening
vi and then call `:set fileformats', the output is

  fileformats=unix,dos

And this is the default setting on Unix systems. 
Cygwin is treated as
a Unix system by vim.

> > However, the unix/dos file recognition works based
on examining only
> > the first line, AFAIK, so if the first line has
only a LF instead of
> > an CRLF for some reason, vim treats the file as
unixy.  Then you see
> > the ^M beginning with line 2.
> 
>  My english is somewhat limited, but as I understand
the "options.txt"
>  in vim doc-folder, vim reads the whole file dicides
on how many <CR>,
>  <CR><NL> and >NL> it found. (However, that chapter
in the docs is not
>  really clear to me).

You're right.  It examines the whole file but the
notes are clear:

- If _all_ lines end in CRLF, it's treated as dos
file.
- If _one_ line is found with only a LF, unix is
preferred over dos.

Corinna

-- 
Corinna Vinschen                  Please, send mails
regarding Cygwin to
Cygwin Developer                               
mailto:cygwin@cygwin.com
Red Hat, Inc.



=====


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

--
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/

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Unix/DOS text mode?
@ 2001-11-13  6:34 Joshua
  2001-11-13  6:40 ` Peter Buckley
  2001-11-13  6:59 ` Corinna Vinschen
  0 siblings, 2 replies; 31+ messages in thread
From: Joshua @ 2001-11-13  6:34 UTC (permalink / raw)
  To: cygwin

    Corinna,

    Thanks for the enlightenment.  Regarding your statement, 'These files
must be in binary mode on Cygwin regardless of the bin/textmode of the
underlying mount point.', what files are you referring to?  I would
understand if the Cygwin files, ie config files in /etc need to be binary,
but are you saying that Cygwin needs to deal with all files (like
/cygwin/c/autoexec.bat) in a binary mode?  Or could the vim packaged with
Cygwin be set to autodetect the binary/text type?  My understanding of how
vim/gvim worked was that it would detect the binary/text type and preserve
the type when you edit save the file.  BCNU//jle


From: Corinna Vinschen <cygwin at cygwin dot com>
To: cygwin at cygwin dot com
Date: Tue, 20 Nov 2001 10:28:25 +0100
Subject: Re: Unix/DOS text mode?
References: <000f01c17193$e7b4c6c0$2ae61718@bdfrd1.tx.home.com>

----------------------------------------------------------------------------
----

On Tue, Nov 20, 2001 at 01:20:59AM -0600, Joshua wrote:
>     Hmm, I've noticed this difference between the PC version of vim/gvim
> versus the vim that comes with cygwin.  Using the PC version, vim/gvim
seems
> to be able to tell whether you're opening a unix file or a PC file and
> display/edit appropriately.
>
>     I tried copying my _vimrc from my PC installation to .vimrc in my home
> directory, but that doesn't do the trick.  I figured it was either a
switch
> in vimrc or something to do with the mounts themselves.  BCNU//jle

The Cygwin vim has the same ability to recognize Unix/DOS files
as the Windows native version.  After a discussion with Bram Moolenaar
he decided not to add that recognition to the vim script files
as .vimrc.  These files must be in binary mode on Cygwin regardless
of the bin/textmode of the underlying mount point.

Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--




--
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/

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: Unix/DOS text mode?
@ 2001-11-12 10:38 Joshua
  2001-11-12 13:38 ` Corinna Vinschen
  2001-11-13  4:38 ` vipin aravind
  0 siblings, 2 replies; 31+ messages in thread
From: Joshua @ 2001-11-12 10:38 UTC (permalink / raw)
  To: cygwin

    Hmm, I've noticed this difference between the PC version of vim/gvim
versus the vim that comes with cygwin.  Using the PC version, vim/gvim seems
to be able to tell whether you're opening a unix file or a PC file and
display/edit appropriately.

    I tried copying my _vimrc from my PC installation to .vimrc in my home
directory, but that doesn't do the trick.  I figured it was either a switch
in vimrc or something to do with the mounts themselves.  BCNU//jle

From: "Larry Hall (RFK Partners, Inc)" <lhall at rfk dot com>
To: AGalick at attotech dot com, cygwin at cygwin dot com
Date: Mon, 19 Nov 2001 16:34:25 -0500
Subject: Re: Unix/DOS text mode?

----------------------------------------------------------------------------
----

At 04:00 PM 11/19/2001, AGalick@attotech.com wrote:
>After an upgrade, I seem to have lost all sanity in vi(m).
>I used to see .txt files the same with notepad or vi, but
>now in vi every line ends with a blue ^M.  I've played
>with mount -[t|b] and tried [un and re]installing vim but I'm
>stumped.  The thing is, it seems to have also disabled all
>the nice search string history/recall (I guess because .viminfo
>also shows those damned ^M's).  What have I done
>or what has cygwin done?  I guess other stuff got upgraded,
>too, but I don't know what.


Try setting "fileformat=dos" in your .vimrc file if you always want
your files to be treated as a DOS text file.  See the help in vim for
more info.





Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX





--
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/

^ permalink raw reply	[flat|nested] 31+ messages in thread
* Unix/DOS text mode?
@ 2001-11-12  3:14 AGalick
  2001-11-12  5:42 ` Larry Hall (RFK Partners, Inc)
  2001-11-12 13:47 ` vipin aravind
  0 siblings, 2 replies; 31+ messages in thread
From: AGalick @ 2001-11-12  3:14 UTC (permalink / raw)
  To: cygwin

After an upgrade, I seem to have lost all sanity in vi(m).
I used to see .txt files the same with notepad or vi, but
now in vi every line ends with a blue ^M.  I've played
with mount -[t|b] and tried [un and re]installing vim but I'm
stumped.  The thing is, it seems to have also disabled all
the nice search string history/recall (I guess because .viminfo
also shows those damned ^M's).  What have I done
or what has cygwin done?  I guess other stuff got upgraded,
too, but I don't know what.

Thanks,
Albert Galick


--
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/

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2001-11-29 19:20 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 12:13 Unix/DOS text mode? Joshua
2001-11-14  1:10 ` Corinna Vinschen
2001-11-14  4:35   ` Bjoern Kahl AG Resy
2001-11-14  5:50     ` Corinna Vinschen
2001-11-14  9:27       ` SSH & Editing in a Basic Shell, etc Peter M Boyd
2001-11-21  5:44         ` Peter M Boyd
2001-11-21  2:17       ` Unix/DOS text mode? Corinna Vinschen
2001-11-21  1:43     ` Bjoern Kahl AG Resy
  -- strict thread matches above, loose matches on Subject: below --
2001-11-20  6:05 AGalick
2001-11-29 11:20 ` AGalick
2001-11-15  2:55 Joshua
2001-11-15  3:19 ` Michael Schaap
2001-11-15  3:46   ` Michael Schaap
2001-11-15  3:47     ` Michael Schaap
2001-11-22 14:33       ` Michael Schaap
2001-11-15  3:50     ` Corinna Vinschen
2001-11-15  3:53       ` Michael Schaap
2001-11-22 14:52         ` Michael Schaap
2001-11-22 14:45       ` Corinna Vinschen
2001-11-22 14:30     ` Michael Schaap
2001-11-22 14:05   ` Michael Schaap
2001-11-22 11:07 ` Joshua
2001-11-13  6:34 Joshua
2001-11-13  6:40 ` Peter Buckley
2001-11-13  6:59 ` Corinna Vinschen
2001-11-12 10:38 Joshua
2001-11-12 13:38 ` Corinna Vinschen
2001-11-13  4:38 ` vipin aravind
2001-11-12  3:14 AGalick
2001-11-12  5:42 ` Larry Hall (RFK Partners, Inc)
2001-11-12 13:47 ` vipin aravind

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).