atom feed18 messages in com.googlegroups.vim_useRe: Binary files, noeol, and other su...
FromSent OnAttachments
AaronOct 24, 2006 8:02 am 
A.J.MechelynckOct 24, 2006 8:58 am 
AaronOct 24, 2006 9:07 am 
Yakov LernerOct 24, 2006 9:26 am 
Bram MoolenaarOct 24, 2006 9:28 am 
A.J.MechelynckOct 24, 2006 9:36 am 
AaronOct 24, 2006 9:38 am 
AaronOct 24, 2006 9:51 am 
Gary JohnsonOct 24, 2006 10:09 am 
A.J.MechelynckOct 24, 2006 10:10 am 
Marvin RenichOct 24, 2006 10:11 am 
AaronOct 24, 2006 10:14 am 
AaronOct 24, 2006 10:26 am 
A.J.MechelynckOct 24, 2006 10:35 am 
Matthew WinnOct 25, 2006 3:24 am 
Yakov LernerOct 25, 2006 5:18 am 
VigilOct 26, 2006 2:43 am 
VigilOct 26, 2006 2:49 am 
Subject:Re: Binary files, noeol, and other such things.
From:Bram Moolenaar (
Date:Oct 24, 2006 9:28:07 am

Aaron Thebailiwick wrote:

Please, oh Vim gurus, explain this binary/noeol situation. It seems to me that if I open a text file in e.g. metapad or Edit Plus or any of these other very simple Windows-based text editors, I am able to delete the "final line break," which appears on screen as though there is a zero-length line right after the last line of text. I press backspace on that empty line and it is gone; so is the EOL.

In order to achieve this in Vim, I must perform strange acrobatics including turning on "binary," which clobbers my textwidth, wrapmargin, expandtab, and modeline options, and forces unix-like line separators.

My only guess is that Vim follows certain established rules for the formatting of proper text files, but I have run across situations where I need to edit text files (AS text files) that have no final EOL, and it pains me that Vim makes this harder than such functionally limited editors as Edit Plus.

Is there some Better Way?

I've heard people argue that a newline character separates lines, thus it's not needed or even desired after the last line. That's the theoretical approach. In practice a text file that doesn't have a newline at the end is most probably truncated. Thus it's more practical to see the newline character as a marker for the end of the line. This has been so for ages on Unix and there is no good reason to do otherwise.