On 14 July 2014, Benjamin R. Haskell <zsh@benizi.com> 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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sunday, July 13, 2014
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment