On Mon, 23 Apr 2007 09:47:21 -0500, Tim Chase <[EMAIL PROTECTED]> wrote:
> > I use vim7 on Win32 and every time I save a file, vim adds a > > new blank (CR+LF) line at the end of the file although it is > > not visible when in vim. Is there an option to disable this > > behaviour? > > yes, there is a way to break expectations :) To expand on that, the CRLF (or LF on Unix or CR on Mac) is a line _terminator_, not a line _separator_, even though many people refer to it as a separator. Every line in a text file should end with the correct end of line sequence, including the last line. If some other editor misinterprets a final CRLF to mean that there's an empty blank line at the end of the file then that editor is broken. Some products will consider a file without a terminator on the final line to have been truncated, and will report it as a potential problem because from the product's point of view the input has terminated unexpectedly in the middle of a line. I used to have this problem at work when people edited scripts with Notepad and then passed them to Oracle's SQL*Plus, resulting in a complaint about truncated input on every script. -- Matthew Winn