Groups | Search | Server Info | Login | Register


Groups > comp.editors > #106843

Re: Vim - gzip'ed text file - noeol ?

From Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups comp.editors
Subject Re: Vim - gzip'ed text file - noeol ?
Date 2025-10-03 11:02 +0200
Organization A noiseless patient Spider
Message-ID <10bo3fj$1jk3q$1@dont-email.me> (permalink)
References <10ahu13$4mb9$1@dont-email.me> <20251003091134.53dc9b8a@ryz.dorfdsl.de> <10bo10b$1iht1$1@dont-email.me>

Show all headers | View raw


On 03.10.2025 10:20, Lawrence D’Oliveiro 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 doesn’t want you to be able to navigate to 
> newline characters -- they’re 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 
> doesn’t. 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

Back to comp.editors | Previous | NextPrevious in thread | Find similar


Thread

Vim - gzip'ed text file - noeol ? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-09-18 23:36 +0200
  Re: Vim - gzip'ed text file - noeol ? Marco Moock <mm@dorfdsl.de> - 2025-10-03 09:11 +0200
    Re: Vim - gzip'ed text file - noeol ? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-03 08:20 +0000
      Re: Vim - gzip'ed text file - noeol ? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-03 11:02 +0200

csiph-web