The bug has been fixed in a recentish Vim patch--you can now explicitly enable ff=dos when opening a file, and Vim will obey you.
:e ++ff=dos I believe in this case Vim will treat CRLF and LF as line breaks, i.e. it will silently convert single LF into CRLF. Single CR will show up as ^M in the buffer. As long as unix is in your 'ffs' option, though, Vim will autodetect filetype and will turn to Unix line endings if it finds a missing CR. For more details on fileformat detection, and on specifying it explicitly when opening a file, etc., see :help 'ff' :help 'ffs' :help ++opt :help file-formats Remember, though, that this thread was about a bug Vim had where it would sometimes ignore the ++ff=dos option. It has now been fixed, but only if you have a Vim complied with that patch in it will you have the benefit of the fix. I don't have time now to look up when it was fixed; someone else may be able to. Ben. s...@online.ms wrote: > Hi, > > are there any news on that? I'm quite interested in that topic, since > it nags me for severals years now. Unfortunately I had never time to > analyze the problem or search the mailing lists. I had the same > experience as Tony: If you have a file with mixed CR and CRLF, you > can't enable ff=dos. Always an UNIX linebreak is assumed, though > ff=dos is set. That way it is hard to find out, where the incorrect > line breaks came in. I would prefer to see a linebreak for every CRLF > (dos) and a ^J for every single CR. > > Regards, Thomas > > On Oct 23 2008, 12:16 am, Ben Schmidt <mail_ben_schm...@yahoo.com.au> > wrote: >> John Beckett wrote: >>> Ben Schmidt wrote: >>>> If you could send me a reply when you see this, Bram, that'd >>>> be good, just so I know it's in the pipeline. >>> Bram announced that he was having a non-networked holiday and will return >>> later. >> Yeah, that's why I'm keen to get a confirmation from him when he does >> see it; it could easily get lost in a big backlog! But I don't like >> nagging people about things they *have* seen. >> >> Smiles, >> >> Ben. > --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---