Linda W wrote:
Seems to be a bug in the "diff.exe" program included
in the VIMRUNTIME dir in the Win32-GUI distribution.

It compares files with CRLF endings as "identical" with
the same text & "LF" endings.

Note -- I'm not using any of the "ignore white space", or ignore
CR's at the end of the line.

I was trying to convert all the text files in the Win vimruntime
dir to standard unix (posix?) line endings (i.e. using half
as many end-of-line characters by reducing eoln to a single
"LF").  I couldn't figure out why files that were clearly of
different size compared as "equal" (no output from diff).  Well
it's because one of them used CRLF's for line endings, and the
other was converted to the unix form.

I don't know if someone thought comparing unequal files was helpful,
but I think it is really not a good idea to compare different files
as anything but "different",  unless the user explicitly says to
ignore line-endings or white space...etc.

I'm running V7.0 (or at least that's what it says when it paints the
"splashscreen".

-linda




Don't know if it's a bug or a feature; but to change all dos-like ends-of-lines to unix-like:

For a single file:

        :e ++ff=dos foobar.txt
        :setlocal ff=unix
        :w

For all *.txt files in the current directory:

        :set fileformats=dos
        :args *.txt
        :set nomore
        :argdo setl ff=unix | w
        :set more " assuming this is your preferred setting

(The ":argdo" line may take some time depending on the number and size of the files.)

HTH,
Tony.

Reply via email to