atom feed18 messages in com.googlegroups.vim_useRe: Binary files, noeol, and other su...
FromSent OnAttachments
AaronOct 24, 2006 8:01 am 
A.J.MechelynckOct 24, 2006 8:57 am 
AaronOct 24, 2006 9:06 am 
Yakov LernerOct 24, 2006 9:26 am 
Bram MoolenaarOct 24, 2006 9:27 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:08 am 
A.J.MechelynckOct 24, 2006 10:10 am 
Marvin RenichOct 24, 2006 10:11 am 
AaronOct 24, 2006 10:13 am 
AaronOct 24, 2006 10:25 am 
A.J.MechelynckOct 24, 2006 10:35 am 
Matthew WinnOct 25, 2006 3:24 am 
Yakov LernerOct 25, 2006 5:17 am 
VigilOct 26, 2006 2:42 am 
VigilOct 26, 2006 2:49 am 
Subject:Re: Binary files, noeol, and other such things.
From:Aaron (aar@thebailiwick.com)
Date:Oct 24, 2006 9:38:30 am
List:com.googlegroups.vim_use

Bram Moolenaar wrote:

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.

Then it's no surprise that Windows text editors follow the "theoretical" and probably broken approach, while the Unix ones do things the way they've always been done.

Thanks for weighing in on this one, Bram.