Am 2015-06-23 01:21, schrieb Pavel Samarkin:
Hi,
Issue: Vim adds EOL to the end of each text file
Although my change might seem controversial, it looks like a lot of
people
(including myself) really want it, especially when using Vim on
non-Unix
systems (e.g. Windows).
You can notice it here:
http://vim.wikia.com/wiki/Preserve_missing_end-of-line_at_end_of_text_files
http://www.vim.org/scripts/script.php?script_id=4550
and in several questions on stackoverflow:
http://stackoverflow.com/questions/1050640
http://stackoverflow.com/questions/4133501
http://stackoverflow.com/questions/14171254
http://askubuntu.com/questions/13317
The solution suggested in Vim FAQ (5.4)
http://vimdoc.sourceforge.net/htmldoc/vimfaq.html
includes some side-effects like inability to use 'expandtab',
'textwidth' and
some other options (incl. Unicode BOM).
My proposed change introduces the new option called 'respecteol'
(that's the
best name I could come up with) which affects the EOL at the end of
file the
same way as the 'binary' option does, while not changing any other
aspects.
The option is local to a buffer, so it can be set depending on a
filetype.
Please let me know if this can be merged.
Thank you.
+1
This has bitten me just recently, I worked on a team repository and
making some changes to the text would lead to the addition of EOL to
some files,
which was in this case unexpected and unintended. It took me a while to
fix this.
So adding an option to make the 'eol' behaviour work better was on my
list
of changes to do next.
So yes, I would definitely appreciate such an option. BTW, it would be
good to add
this option to $VIMRUNTIME/optwin.vim
and having tests would also help.
Best,
Christian
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.