On Friday, November 20, 2015 at 1:35:35 PM UTC-6, Tony Mechelynck wrote: > On Fri, Nov 20, 2015 at 4:44 PM, Ben Fritz <[email protected]> wrote: > > > > There are complicated workarounds using the 'binary' option for earlier Vim > > versions without the fixeol option. > > > > The workarounds are not complicated, however it must be remembered > that closing a file to edit sets 'eol' on on it, unless it has either > 'binary' or (in recent Vim versions) 'nofixeol'. So, even in old Vim > builds: > > - To do it once, use > :setlocal bin noeol > just before saving. >
The complicated part comes in because 'binary' will *always* write with Unix line endings even if the file was read with something else. See http://vim.wikia.com/wiki/Preserve_missing_end-of-line_at_end_of_text_files for a full workaround preserving not only the missing end of line but also the fileformat. The script there should work to accomplish the task at hand in older Vims that don't have the 'fixeol' option. -- -- 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.
