Loading ...
Sorry, an error occurred while loading the content.

142650Re: RFE: honor 'eol' setting regardless of 'binary' flag.

Expand Messages
  • Linda A. Walsh
    Jul 13, 2014
    • 0 Attachment
      John Little wrote:
      > On Sunday, July 13, 2014 6:56:20 PM UTC+12, Linda A. Walsh wrote:
      >> Where is it written that the last line of a file needs a uselss linefeed?
      > POSIX definition of a text file is a file that contains characters organized into zero or more lines:
      > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_397
      > A line is defined to have a newline:
      > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
      > Text files with incomplete last lines have problems with lots of tools, like the diff programmes used by version control systems. If you are not using a VCS like mercurial or git, I suggest you look into it, they're a very good idea.
      > Regards, John Littl
      I appreciate the reference, as the standard says text files may contain
      0 or more lines
      and that a line cannot contain NUL characters and none can exceed
      LINE_MAX bytes
      in LENGTH including a NL **[if one is present]**. (bracketed text, mine).

      It does not say that a text file may not contain text characters at the
      end of
      the file. It infers that such would NOT be a line. Vim converts those
      characters into a line -- and would be *creating*
      lines in files where previously there were none.

      This is an error in Vim under POSIX, as you note. Vim is not POSIX
      but that is really moot to the idea of allowing a choice.

      Vim embodies having, not only a choice other than POSIX, but a multitude
      of choices. If Vim were to delete all non-POSIX features, there would
      only be "vi": i.e. -- there would be no Vim.

      Are you saying Vim should not exist?

      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Show all 31 messages in this topic