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

classic Classic list List threaded Threaded
31 messages Options
12
Reply | Threaded
Open this post in threaded view
|

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

L. A. Walsh

Have two request, actually,

1) first is to honor the 'eol' setting in text files just as
in binary

2) is to not make changes to a user's file unless they
ask them to be made (i.e. 'eol' would be "true" by
default -- don't modify end-of-file).  With the
option to modify EOF by adding an 'eol' being
the optional behavior?

thanks... while 2 might generate some controversy, is there
a reason why "1" would be problem?

thanks again!
linda


--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Eric Pruitt
On Sat, Jul 12, 2014 at 04:09:01PM -0700, Linda A. Walsh wrote:
> 2) is to not make changes to a user's file unless they
> ask them to be made (i.e. 'eol' would be "true" by
> default -- don't modify end-of-file).  With the
> option to modify EOF by adding an 'eol' being
> the optional behavior?

I am opposed to this change because Vim is primarily a _text_ editor,
and its defaults should reflect as much. Certain text editors
(*cough*sublime*cough*) default to not adding an EOL at the end of
files. If honoring the EOL were the default behavior, then I would have
to manually verify (or be prompted every time) whether or not every text
file I edit has a proper EOL at the end of the file. I edit
files-from-users-whose-editors-don't-add-EOL far more often that I edit
binary files with Vim, and I imagine that's the situation for most Vim
users.

Eric

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

John Little-4
In reply to this post by L. A. Walsh
This is an issue with a long history, caused by? started? originating? in windows editors not writing the end of line on the last line of files, and interpreting such an eol as a blank line.  The reaction from the older, unixy camp, was that the windows editors are broken, not writing the last eol screws up concatenation of files and interpolation of text, so it's a dumb thing to do.  Their POV is enshrined in some standards somewhere, I think.  The issue has been going for at least two decades.

If you're not writing the file, then it's not a problem, and if you are making changes, and it is a text file, why not write the last eol?

Regards, John Little

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Yukihiro Nakadaira-2
In reply to this post by L. A. Walsh
On Sun, Jul 13, 2014 at 8:09 AM, Linda A. Walsh <[hidden email]> wrote:

Have two request, actually,

1) first is to honor the 'eol' setting in text files just as
in binary

2) is to not make changes to a user's file unless they
ask them to be made (i.e. 'eol' would be "true" by
default -- don't modify end-of-file).  With the
option to modify EOF by adding an 'eol' being
the optional behavior?

+1

--
Yukihiro Nakadaira - [hidden email]

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

L. A. Walsh
In reply to this post by John Little-4
John Little wrote:
> If you're not writing the file, then it's not a problem, and if you are making changes, and it is a text file, why not write the last eol?
>
> Regards, John Little
>  
---
Because it is modifying/changing the file w/o the user asking it to do so.
Such behavior is says that the designers know better than the users how
files should be constructed, rather than letting the user decide.

That is distasteful.

The change wouldn't DISABLE the ability for those who want the behavior
to turn it own.  Indeed, I might turn it on by default, for most of the
files
I edit don't have this problem, but I think it is wrong to modify the file
by default and force users into compliance.

It should have been optional from the start.



Eric Pruitt wrote:
>
>
> I am opposed to this change because Vim is primarily a _text_ editor,
> and its defaults should reflect as much.
----
Where is it written that the last line of a file needs a uselss linefeed?

I don't have a line feed at the end of a physical page when typing.

I remove the paper.  It's called end of file.

Editors were supposed to mimic this physical behavior.  There is no
analog to requiring the user to hit LF at the end of a paper or a file.


>  Certain text editors
> (*cough*sublime*cough*) default to not adding an EOL at the end of
> files. If honoring the EOL were the default behavior, then I would have
> to manually verify (or be prompted every time) whether or not every text
> file I edit has a proper EOL at the end of the file.
Did you read the option?  It says the default would be for that option
to ship 'on'...
and work w/text.  It doesn't say you _couldn't_ have the current
behavior by setting it
off.  Why is it that you think I would impose a lack of choice on you?

Oh, you support doing so to others.  I see.  That's called projection,
but is not reality.
Just because you support other having no choice in this matter, doesn't
mean I would
require others (including you) to abide by my choice.  I find that
illogical.

What is the problem with making the option work in text mode is what?

Whether it is default or not is minor compared to it simply being
broken/not working
in text mode.  Default or not, any user that wants other than the
default will have it
in their <X>rc file if the option was a working one.


>  I edit
> files-from-users-whose-editors-don't-add-EOL far more often that I edit
> binary files with Vim, and I imagine that's the situation for most Vim
> users.
>  
---
The file I edited was a text config that was of a "fixed" size -- i.e.
adding a character
to the end corrupted it.  But that is still irrelevant to making the option
work or why making changes to a user's file should be done w/o their
permission.

Can you explain why you would be against the option working ?

Or are you just arguing about the default (which you could change on your
machines -- or I could on mine), which I argue for being "not changing
things (anything) "for the user" w/o them doing it or wanting it.

Imagine if vim always converted your file to have CRLF in it because it
was "safer"...
And that there was no way to turn it off because the option was broken
in 'text mode'.
I don't think you would be pleased.

Doing it for a user w/o their choice or buy-in and making it impossible
for them to
have a choice is noxious, IMO.

I.e. if you support my right to have a choice, I can support yours (in
general).









--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

John Little-4
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 Little

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

L. A. Walsh
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
compatible,
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Erik Christiansen
On 13.07.14 01:45, Linda A. Walsh wrote:
> 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?

Now you begin to resemble a troll.

The pretence that Vim denies choice in the "missing EOL" scenario is
unconvincing.

On 12.07.14 23:56, Linda A. Walsh wrote:
> by default and force users into compliance.
> Doing it for a user w/o their choice or buy-in and making it
> impossible for them to have a choice is noxious, IMO.

That imaginary situation is mere misapprehension. Are you unaware of the
existence of .vimrc? That's where your divergent defaults should be set,
making them suit personal needs.

The script provided upthread via URL is a slightly complex behaviour
modification, but all the work has been done. Even if copy-paste of the
script is a great burden for some, it does provide the desired behaviour
(and therefore choice) after that herculean effort, does it not?

Erik

--
We all have to reinvent the wheel, and the axle and the transmission and
the engine, many times over. Its called learning.   -  Bill Colburn

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Christian Brabandt
In reply to this post by L. A. Walsh
Hi Linda!

On So, 13 Jul 2014, Linda A. Walsh wrote:

> 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
> compatible,
> 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?

I am not sure, if being silly helps in getting anybody convinced that
Vim's behaviour should change. In fact, I don't see your problem. Just
set the required options and be done.

Best,
Christian
--
Wenn ein Mensch ein Loch sieht, hat er das Bestreben, es auszufüllen. Dabei
fällt er meist hinein.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Christian Brabandt
In reply to this post by L. A. Walsh
Hi Linda!

On Sa, 12 Jul 2014, Linda A. Walsh wrote:

> John Little wrote:
> >If you're not writing the file, then it's not a problem, and if you are making changes, and it is a text file, why not write the last eol?
> Because it is modifying/changing the file w/o the user asking it to do so.
> Such behavior is says that the designers know better than the users how
> files should be constructed, rather than letting the user decide.
>
> That is distasteful.

You told Vim to save the file, didn't you? That is not what I would call
"changing the file without the user asking it to do so"

Best,
Christian
--
Die Moral ist für Sklaven geschaffen, für Wesen ohne Geist.
                -- Henry Miller (Von der Unmoral der Moral)

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

L. A. Walsh
In reply to this post by Erik Christiansen
Erik Christiansen wrote:

> On 13.07.14 01:45, Linda A. Walsh wrote:
>  
>> 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?
>>    
>
> Now you begin to resemble a troll.
>
> The pretence that Vim denies choice in the "missing EOL" scenario is
> unconvincing.
>  
To you, perhaps, but any task to free slaves was unconvincing to those
who owned them.  I.e any argument to those who maintain the status quo is
usually unconvincing.


> On 12.07.14 23:56, Linda A. Walsh wrote:
>  
>> by default and force users into compliance.
>> Doing it for a user w/o their choice or buy-in and making it
>> impossible for them to have a choice is noxious, IMO.
>>    
>
> That imaginary situation is mere misapprehension. Are you unaware of the
> existence of .vimrc? That's where your divergent defaults should be set,
> making them suit personal needs.
>  
If it was setting a flag, I wouldn't have raised the issue.  If it
involves a
long complex script, and/or external helper programs on each platform
then I am.

> The script provided upthread via URL is a slightly complex behaviour
> modification, but all the work has been done. Even if copy-paste of the
> script is a great burden for some, it does provide the desired behaviour
> (and therefore choice) after that herculean effort, does it not?
>  
----
    It also talks about needing external utilities ported to each
platform to work
reliably (the pure-vim script says the other is more reliable).
> Erik
>
>  

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

L. A. Walsh
In reply to this post by Christian Brabandt
Christian Brabandt wrote:

> Hi Linda!
>
> On So, 13 Jul 2014, Linda A. Walsh wrote:
>
>  
>> 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
>>>      
>> Are you saying Vim should not exist?
>>    
>
> I am not sure, if being silly helps in getting anybody convinced that
> Vim's behaviour should change. In fact, I don't see your problem. Just
> set the required options and be done.
>  
---
    Trying to claim POSIX compliance as a justification for this behavior
is what is silly.  vim was born out of a desire for more than such.  
Someone is using POSIX
to justify not having it be a choice.

    That's what is silly.


--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Christian Brabandt
On So, 13 Jul 2014, Linda A. Walsh wrote:

> Christian Brabandt wrote:
> >Hi Linda!
> >
> >On So, 13 Jul 2014, Linda A. Walsh wrote:
> >
> >>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
> >>Are you saying Vim should not exist?
> >
> >I am not sure, if being silly helps in getting anybody convinced
> >that Vim's behaviour should change. In fact, I don't see your
> >problem. Just set the required options and be done.
> ---
>    Trying to claim POSIX compliance as a justification for this behavior
> is what is silly.  vim was born out of a desire for more than such.
> Someone is using POSIX
> to justify not having it be a choice.
>
>    That's what is silly.

No it is not. POSIX is pretty clear here and Vim is actually adhering to
the standard. If you like it or not. Being ironically won't make you
more convincing.

Best,
Christian
--
Leitfaden durch die Phraseologie wissenschaftlicher Veröffentlichungen:
Englisch:
  To our knowledge, this is the first paper which reports that
Deutsch:
  Prioritätsanspruch für eine unbedeutende Entdeckung

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

L. A. Walsh
Christian Brabandt wrote:

>>    Trying to claim POSIX compliance as a justification for this behavior
>> is what is silly.  vim was born out of a desire for more than such.
>> Someone is using POSIX
>> to justify not having it be a choice.
>>
>>    That's what is silly.
>>    
>
> No it is not. POSIX is pretty clear here and Vim is actually adhering to
> the standard. If you like it or not. Being ironically won't make you
> more convincing.
>  
----
    POSIX defines the behavior for "vi" as well.  Vim isn't vi.
If you want to talk POSIX, then you can only talk about vim without
extensions
and only having the POSIX compliant subset that is known as "vi".

That's why I said, if you want to claim POSIX compliance as a reason, then
you are also disallowing any behavior different from the POSIX standards
which specifies only the "vi-compat" subset.

You are claiming that a non-POSIX behavior of changing a file from
containing 0 lines, to one that has 1 line is POSIX compatible.

No where does it say that a LF should be added at the end of file.

Many unix config files don't have LF's at the end of file; they can
be redundent and confusing.  If I want to know the answer to a question
and store the answer in a file as 'yes' or 'no', if vim changes that to
'yes\n' or 'yes\r\n', is corrupting a text file.  It changes it's meaning.


> Best,
> Christian
>  

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Tim Chase
In reply to this post by L. A. Walsh
On 2014-07-13 12:44, Linda A. Walsh wrote:
>> In fact, I don't see your problem. Just set the required options
>> and be done.
>
>     Trying to claim POSIX compliance as a justification for this
> behavior is what is silly.  vim was born out of a desire for more
> than such. Someone is using POSIX
> to justify not having it be a choice.
>
>     That's what is silly.

Vim was born from a POSIX world and so it expects lines to end with
newlines.  I just tested Christian's advice and Vim readily does
what you want:

  bash$ printf "one" > no_eol.txt
  bash$ echo set binary > testvimrc
  bash$ vim -u testvimrc no_eol.txt
  :0put='zero'
  :x
  bash$ xxd no_eol.txt
  [output that shows no trailing newline]

Take Christian's advice: just put "set binary" in your vimrc and be
done with it.  Anything more is just trolling the list.

-tim



--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

L. A. Walsh
Tim Chase wrote:
> Take Christian's advice: just put "set binary" in your vimrc and be
> done with it.  Anything more is just trolling the list.
>  
---
    set binary changes other settings that I don't want changed:
The following options will be ignored:
textwidth, wrapmargin, modeline, expandtab, fileformat, (and fileformats)

    I only need this behavior:

    When writing a file the <EOL> for the last line is only written if
    there was one in the original file (normally Vim appends an <EOL> to
    the last line if there is none; this would make the file longer).  See
    the 'endofline' option.

    --- and what I asked for initally (see subject)...
is for the eol setting to be honored regardless of it being in text or
binary
mode.

You are forcing your way of doing things down everyone else's throat --
then calling anyone who disagrees a 'troll'.

Asking that vim honor the 'eol' in text is asking for a broken feature to be
fixed.

Having it only work in binary, where the desired behavior already works
is not helpful.  If the option worked in text mode, then this discussion
wouldn't be necessary.  Calling anyone who asks for an option -- ALREADY
IN VIM -- to work consistently is not trolling.  It's asking for sanity.

It's much easier to argue for the one who maintains an irrational position
as being a troll.



--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Erik Christiansen
In reply to this post by L. A. Walsh
On 13.07.14 12:42, Linda A. Walsh wrote:

> Erik Christiansen wrote:
> >On 12.07.14 23:56, Linda A. Walsh wrote:
> >>by default and force users into compliance.
> >>Doing it for a user w/o their choice or buy-in and making it
> >>impossible for them to have a choice is noxious, IMO.
> >
> >That imaginary situation is mere misapprehension. Are you unaware of the
> >existence of .vimrc? That's where your divergent defaults should be set,
> >making them suit personal needs.
>
> If it was setting a flag, I wouldn't have raised the issue.  If it
> involves a long complex script, and/or external helper programs on
> each platform then I am.

Ah, confirmation that a simple copy/paste is too much trouble for a
troll. But then, trolling the list is your prime objective, isn't it? As
quoted above, first you claimed it was "noxious" denial of choice. Now
you admit you can't be bothered to exercise the choice which is
provided. There is no prize for being this week's Droll Troll, you
realise? ;-)

> >The script provided upthread via URL is a slightly complex behaviour
> >modification, but all the work has been done. Even if copy-paste of the
> >script is a great burden for some, it does provide the desired behaviour
> >(and therefore choice) after that herculean effort, does it not?

>    It also talks about needing external utilities ported to each
> platform to work reliably (the pure-vim script says the other is more
> reliable).

Ah, confirmation that you have not tried it, instead expending all your
energies on trolling the list. Please help yourself by accepting the
generous advice offered: copy/paste the script, or use an external
utility if you like. We do not care which.

Erik

--
"Microsoft is not the answer. It is the question. The answer is 'No'."
                                                           - Unknown

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Benjamin R. Haskell
In reply to this post by L. A. Walsh
On Sun, Jul 13, 2014 at 5:04 PM, Linda W <[hidden email]> wrote:
Tim Chase wrote:
Take Christian's advice: just put "set binary" in your vimrc and be
done with it.  Anything more is just trolling the list.
 
---
   set binary changes other settings that I don't want changed:
The following options will be ignored:
textwidth, wrapmargin, modeline, expandtab, fileformat, (and fileformats)

   I only need this behavior:

   When writing a file the <EOL> for the last line is only written if
   there was one in the original file (normally Vim appends an <EOL> to
   the last line if there is none; this would make the file longer).  See
   the 'endofline' option.

   --- and what I asked for initally (see subject)...
is for the eol setting to be honored regardless of it being in text or binary
mode.

I'd also like to +1 the initial request, but this is a request that has been made, and was subsequently denied, in the past:
"""
Actually, you should normally not set binary to write back what was read.
'endoffile' is the exception, and that's because a decent text file must
end with a LF.  Vim fixes that for you (it always has).  If other tools
omit that LF you need to fix those tools, not Vim.
"""

For the poster who suggested VCS's like git: that's the reason I want the 'eol' setting to be respected.  If a file is checked into a git repo without the trailing newline, editing the file in Vim causes the newline to be added, which looks like a change, even if 'noeol' is set.  I would like Vim to not add anything I'm not intentionally adding.  The fact that 'eol' is conditioned on 'binary' simply doesn't make sense.

-- 
Best,
Ben

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Benjamin R. Haskell-8
In reply to this post by L. A. Walsh
On Sun, Jul 13, 2014 at 5:04 PM, Linda W <[hidden email]> wrote:
Tim Chase wrote:
Take Christian's advice: just put "set binary" in your vimrc and be
done with it.  Anything more is just trolling the list.
 
---
   set binary changes other settings that I don't want changed:
The following options will be ignored:
textwidth, wrapmargin, modeline, expandtab, fileformat, (and fileformats)

   I only need this behavior:

   When writing a file the <EOL> for the last line is only written if
   there was one in the original file (normally Vim appends an <EOL> to
   the last line if there is none; this would make the file longer).  See
   the 'endofline' option.

   --- and what I asked for initally (see subject)...
is for the eol setting to be honored regardless of it being in text or binary
mode.

I'd also like to +1 the initial request, but this is a request that has been made, and was subsequently denied, in the past:
"""
Actually, you should normally not set binary to write back what was read.
'endoffile' is the exception, and that's because a decent text file must
end with a LF.  Vim fixes that for you (it always has).  If other tools
omit that LF you need to fix those tools, not Vim.
"""

For the poster who suggested VCS's like git: that's the reason I want the 'eol' setting to be respected.  If a file is checked into a git repo without the trailing newline, editing the file in Vim causes the newline to be added, which looks like a change, even if 'noeol' is set.  I would like Vim to not add anything I'm not intentionally adding.  The fact that 'eol' is conditioned on 'binary' simply doesn't make sense.

-- 
Best,
Ben

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

LCD 47
In reply to this post by Benjamin R. Haskell
On 14 July 2014, Benjamin R. Haskell <[hidden email]> wrote:
[...]

> I'd also like to +1 the initial request, but this is a request
> that has been made, and was subsequently denied, in the past:
> https://groups.google.com/d/msg/vim_use/clf_u55xrOA/UYLSNoIPELEJ -
> wherein Bram replied:
> """
> Actually, you should normally not set binary to write back what was
> read. 'endoffile' is the exception, and that's because a decent text
> file must end with a LF.  Vim fixes that for you (it always has).  If
> other tools omit that LF you need to fix those tools, not Vim.
> """
>
> For the poster who suggested VCS's like git: that's the reason I want
> the 'eol' setting to be respected.  If a file is checked into a git
> repo without the trailing newline, editing the file in Vim causes
> the newline to be added, which looks like a change, even if 'noeol'
> is set.  I would like Vim to not add anything I'm not intentionally
> adding.  The fact that 'eol' is conditioned on 'binary' simply doesn't
> make sense.

    Another valid case (IMO) for respecting 'noeol' is that of template
systems, such as Django, TT2, ERB, and PHP itself.  Trailing EOL is
often significant in templates, and having to switch on some special
setting when editing such templates just to avoid messing them up is
less than funny.

    I'm not saying that relying on (lack of) final EOL for formatting is
a good practice, but it's a widespread one.  And making it a pain in the
rear to deal with it in Vim is not going to discourage its use. *shrug*

    /lcd

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
12