RE: Using vi in UNIX mode instead of DOS mode

2005-03-21 Thread Reid Thompson
Auteria Wally Winzer Jr. wrote:
 Is there anyway of telling vi to use UNIX-mode editing
 as supposed to DOS-mode? I want to avoid all the
 ^M's when transferring files from Windows to UNIX,
 even though I use dos2unix to remove them, I want to just simply
 avoid that step. 
 
 Any and all assistence is grately appreciated.
 
 Regards,
 Auteria W. Winzer Jr.

:help fileformat

reid

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Using vi in UNIX mode instead of DOS mode

2005-03-21 Thread Igor Pechtchanski
On Mon, 21 Mar 2005, Reid Thompson wrote:

 Auteria Wally Winzer Jr. wrote:
  Is there anyway of telling vi to use UNIX-mode editing
  as supposed to DOS-mode? I want to avoid all the
  ^M's when transferring files from Windows to UNIX,
  even though I use dos2unix to remove them, I want to just simply
  avoid that step.
 
  Any and all assistence is grately appreciated.
 
  Regards,
  Auteria W. Winzer Jr.

 :help fileformat

 reid

...or use binary mounts.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Using vi in UNIX mode instead of DOS mode

2005-03-21 Thread Auteria Wally Winzer Jr.
how do you use the binary mounts Igor?

Auteria

--- Igor Pechtchanski [EMAIL PROTECTED] wrote:
 On Mon, 21 Mar 2005, Reid Thompson wrote:
 
  Auteria Wally Winzer Jr. wrote:
   Is there anyway of telling vi to use UNIX-mode
 editing
   as supposed to DOS-mode? I want to avoid all the
   ^M's when transferring files from Windows to
 UNIX,
   even though I use dos2unix to remove them, I
 want to just simply
   avoid that step.
  
   Any and all assistence is grately appreciated.
  
   Regards,
   Auteria W. Winzer Jr.
 
  :help fileformat
 
  reid
 
 ...or use binary mounts.
   Igor
 -- 
   http://cs.nyu.edu/~pechtcha/
   |\  _,,,---,,_  [EMAIL PROTECTED]
 ZZZzz /,`.-'`'-.  ;-;;,_  [EMAIL PROTECTED]
  |,4-  ) )-,_. ,\ (  `'-' Igor Pechtchanski,
 Ph.D.
 '---''(_/--'  `-'\_) fL   a.k.a
 JaguaR-R-R-r-r-r-.-.-.  Meow!
 
 The Sun will pass between the Earth and the Moon
 tonight for a total
 Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27
 2004, 12:01 pm EDT
 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Using vi in UNIX mode instead of DOS mode

2005-03-21 Thread Christopher Faylor
On Mon, Mar 21, 2005 at 01:39:42PM -0500, Igor Pechtchanski wrote:
On Mon, 21 Mar 2005, Reid Thompson wrote:

 Auteria Wally Winzer Jr. wrote:
  Is there anyway of telling vi to use UNIX-mode editing
  as supposed to DOS-mode? I want to avoid all the
  ^M's when transferring files from Windows to UNIX,
  even though I use dos2unix to remove them, I want to just simply
  avoid that step.
 
  Any and all assistence is grately appreciated.
 
  Regards,
  Auteria W. Winzer Jr.

 :help fileformat

 reid

...or use binary mounts.

I think vim will still help you even if you have binary mounts though,
won't it?  I just noticed that one of the files that I was editing on
UNIX had CRLF line endings and vim was nice enough to mask that fact for
me.  I would expect binary mounts to behave similarly.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Using vi in UNIX mode instead of DOS mode

2005-03-21 Thread Igor Pechtchanski
On Mon, 21 Mar 2005, Christopher Faylor wrote:

 On Mon, Mar 21, 2005 at 01:39:42PM -0500, Igor Pechtchanski wrote:
 On Mon, 21 Mar 2005, Reid Thompson wrote:
 
  Auteria Wally Winzer Jr. wrote:
   Is there anyway of telling vi to use UNIX-mode editing
   as supposed to DOS-mode? I want to avoid all the
   ^M's when transferring files from Windows to UNIX,
   even though I use dos2unix to remove them, I want to just simply
   avoid that step.
  
   Any and all assistence is grately appreciated.
  
   Regards,
   Auteria W. Winzer Jr.
 
  :help fileformat
 
  reid
 
 ...or use binary mounts.

 I think vim will still help you even if you have binary mounts though,
 won't it?  I just noticed that one of the files that I was editing on
 UNIX had CRLF line endings and vim was nice enough to mask that fact for
 me.  I would expect binary mounts to behave similarly.

Yes, it'll help, but I understood the OP's question as how to get new
files written by VIm to have LF line endings *by default*.  Once you
already have a file with CRLF line endings, Reid's answer about
'fileformat' is the way to go.  Also, the 'fileformats' option (note the
's' at the end) configures this behavior (:se ffs=unix will turn off
this help).
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Using vi in UNIX mode instead of DOS mode

2005-03-21 Thread Igor Pechtchanski
On Mon, 21 Mar 2005, Auteria Wally Winzer Jr. wrote:

 --- Igor Pechtchanski [EMAIL PROTECTED] wrote:

http://cygwin.com/acronyms/#PCYMTNQREAIYR.  Thanks.

  On Mon, 21 Mar 2005, Reid Thompson wrote:
 
   Auteria Wally Winzer Jr. wrote:
Is there anyway of telling vi to use UNIX-mode editing as supposed
to DOS-mode? I want to avoid all the ^M's when transferring
files from Windows to UNIX, even though I use dos2unix to remove
them, I want to just simply avoid that step.
   
Any and all assistence is grately appreciated.
   
Regards,
Auteria W. Winzer Jr.
  
   :help fileformat
  
   reid
 
  ...or use binary mounts.
  Igor

 how do you use the binary mounts Igor?

 Auteria

man mount should help.  Also,
http://cygwin.com/cygwin-ug-net/using-utils.html#mount and
http://cygwin.com/faq/faq_3.html#SEC74.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Using vi in UNIX mode instead of DOS mode

2005-03-21 Thread Auteria Wally Winzer Jr.
Thanks alot Igor for providing such valuable
information.

Auteria

--- Igor Pechtchanski [EMAIL PROTECTED] wrote:
 On Mon, 21 Mar 2005, Auteria Wally Winzer Jr. wrote:
 
  --- Igor Pechtchanski [EMAIL PROTECTED] wrote:
 
 http://cygwin.com/acronyms/#PCYMTNQREAIYR. 
 Thanks.
 
   On Mon, 21 Mar 2005, Reid Thompson wrote:
  
Auteria Wally Winzer Jr. wrote:
 Is there anyway of telling vi to use
 UNIX-mode editing as supposed
 to DOS-mode? I want to avoid all the ^M's
 when transferring
 files from Windows to UNIX, even though I
 use dos2unix to remove
 them, I want to just simply avoid that step.

 Any and all assistence is grately
 appreciated.

 Regards,
 Auteria W. Winzer Jr.
   
:help fileformat
   
reid
  
   ...or use binary mounts.
 Igor
 
  how do you use the binary mounts Igor?
 
  Auteria
 
 man mount should help.  Also,

http://cygwin.com/cygwin-ug-net/using-utils.html#mount
 and
 http://cygwin.com/faq/faq_3.html#SEC74.
   Igor
 -- 
   http://cs.nyu.edu/~pechtcha/
   |\  _,,,---,,_  [EMAIL PROTECTED]
 ZZZzz /,`.-'`'-.  ;-;;,_  [EMAIL PROTECTED]
  |,4-  ) )-,_. ,\ (  `'-' Igor Pechtchanski,
 Ph.D.
 '---''(_/--'  `-'\_) fL   a.k.a
 JaguaR-R-R-r-r-r-.-.-.  Meow!
 
 The Sun will pass between the Earth and the Moon
 tonight for a total
 Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27
 2004, 12:01 pm EDT
 

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: Using vi in UNIX mode instead of DOS mode

2005-03-21 Thread Reid Thompson
at one time i'd pulled these from somewhere also -- currently they are
commented out in my .*vimrc.

au BufReadPre * if (ff == dos) |au BufReadPost * set fileformat=unix
|au BufReadPost * %s/^M\+$// | endif
au BufReadPost * if (ff == dos) | set ff=unix | %s/^M\+$// | endif

reid

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/