Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3BB4BB14.2250D4AE@airflash.com> Date: Fri, 28 Sep 2001 11:01:56 -0700 From: "Alex Tang" 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: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 ? Yes > 2) If I wanted to have the files written as unix files with the EOL as just > , fileformat should be "unix". Yes > 3) is there an easy way I can convert a file within vim from to > 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 and , you can always do: :%s///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/