Hi all


On 2015-06-23 Tuesday at 16:58 -0700 Pavel Samarkin wrote:
> > 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. 
> 
> Christian - thank you for the quick response.
> See attachment for the updated patch.
> 
> I could not find a good test to modify, so I created a new one (test_reol)
> and added it to all makefiles. I tested it on Windows 7 and Mac OS X.
> 
> Also, I updated optwin.vim and syntax/vim.vim.
> 
> I split my patch in two files - one for source code changes, one for the
> changes to runtime, for easier review.


@Pavel
Thank you for your work.


There are more cases, where vim tries to fix “errors” or “irregularities” of 
files and thereby damages them, unless “++binary” has been included in the 
reading command.  Just two examples:

(1)  viminfo files with register contents resulting from alternating 
     fileencondings, e.g. utf-8, latin1, latin9:  When viewing or editing such 
     viminfo files, including “++binary” in the reading command avoids data 
     damage.  How can I specify the binary attribute, when vim tries to restore 
     this register contents in a later session?  vim-7.4 appears to ignore the 
     line “*encoding=utf-8“ on reading of viminfo files.
(2)  The patch file resulting from the diff between old and new files after 
     a command similar to “iconv -f ISO-8859-1 -t utf-8 …” usually needs to be 
     treated as binary.  vim damages such patch files on writing, unless the 
     reading command includes “++binary”.

A concept which can be reused  _consistently_  for the solution of all problems 
of this class probably can save a lot of future work time.

Transparent decompression and compression of *.gz *.bz2 … files is implemented 
with certain autocommands.  This autocommands require much less lines of code 
than the patch proposed by Pavel.  Why not solving the “missing trailing EOL” 
problem with similar autocommands?  Less lines of code means less time to wait 
until Bram can merge this and other patches.

Are the more lines of code of Pavels patch outweight by better reusability, 
compared to autocommands?



-- 
Roland Eggner

-- 
-- 
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.

Attachment: pgpXK_IVGYbLj.pgp
Description: PGP signature

Raspunde prin e-mail lui