• Vim - gzip'ed text file - noeol ?

    From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.editors on Thu Sep 18 23:36:34 2025
    From Newsgroup: comp.editors

    It never occurred to me that Vim displays *.gz (gzip'ed) text files
    in unzipped form; noticed it just by accident. - That's nice!

    What I was wondering about, though, was that it displays the text
    file with the marker "[noeol]" despite the text file's last line is
    terminated correctly by a '\n'. - A bug? (Observed with Vim 7.3)

    Of course the binary *.gz file has "noeol" but since it's displayed
    in expanded form that tag is quite misleading and doesn't contribute
    any useful information here (IMO).

    Janis, curious
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to comp.editors on Fri Oct 3 09:11:34 2025
    From Newsgroup: comp.editors

    On 18.09.2025 23:36 Uhr Janis Papanagnou wrote:

    What I was wondering about, though, was that it displays the text
    file with the marker "[noeol]" despite the text file's last line is terminated correctly by a '\n'. - A bug? (Observed with Vim 7.3)

    I can confirm this with 9.1.1230-2.

    EOL exists, vim can find it and even after saving the file, the message
    still occurs.
    --
    kind regards
    Marco

    Send spam to 1758231394muell@stinkedores.dorfdsl.de

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.editors on Fri Oct 3 08:20:27 2025
    From Newsgroup: comp.editors

    On Fri, 3 Oct 2025 09:11:34 +0200, Marco Moock wrote:

    On 18.09.2025 23:36 Uhr Janis Papanagnou wrote:

    What I was wondering about, though, was that it displays the text file
    with the marker "[noeol]" despite the text file's last line is
    terminated correctly by a '\n'. - A bug? (Observed with Vim 7.3)

    I can confirm this with 9.1.1230-2.

    EOL exists, vim can find it and even after saving the file, the message
    still occurs.

    The problem is that Vim wants to assume that every line ends with a
    newline character, but it doesnrCOt want you to be able to navigate to
    newline characters -- theyrCOre supposed to be invisible, or something.

    Other more reasonably-designed editors are capable of distinguishing
    between files where the last line ends with a newline, and ones where it doesnrCOt. Vim cannot.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Janis Papanagnou@janis_papanagnou+ng@hotmail.com to comp.editors on Fri Oct 3 11:02:41 2025
    From Newsgroup: comp.editors

    On 03.10.2025 10:20, Lawrence DrCOOliveiro wrote:
    On Fri, 3 Oct 2025 09:11:34 +0200, Marco Moock wrote:

    On 18.09.2025 23:36 Uhr Janis Papanagnou wrote:

    What I was wondering about, though, was that it displays the text file
    with the marker "[noeol]" despite the text file's last line is
    terminated correctly by a '\n'. - A bug? (Observed with Vim 7.3)

    I can confirm this with 9.1.1230-2.

    Thanks for the confirmation with a newer version!

    EOL exists, vim can find it and even after saving the file, the message
    still occurs.

    The problem is that Vim wants to assume that every line ends with a
    newline character, but it doesnrCOt want you to be able to navigate to newline characters -- theyrCOre supposed to be invisible, or something.

    You missed the point.

    Other more reasonably-designed editors are capable of distinguishing
    between files where the last line ends with a newline, and ones where it doesnrCOt. Vim cannot.

    Of course it can. (As you are an Emacs user you should better
    refrain from comments on Vim and "reasonably-designed editors".)

    $ echo hi > xxx
    $ vim xxx
    hi
    "xxx" 1L, 3C

    $ echo -n hi > xxx
    $ vim xxx
    hi
    "xxx" [noeol] 1L, 2C

    But as a sophistically designed editor Vim fixes incomplete lines
    on writing, and (different from other, more primiitive editors)
    doesn't create text files with incomplete lines in the first place.

    Janis

    --- Synchronet 3.21a-Linux NewsLink 1.2