On 2012-05-14, Ben Fritz wrote:
> On Monday, May 14, 2012 1:34:52 PM UTC-5, Gary Johnson wrote:
> > 
> > How much slower is it for a file large enough that the write times
> > are more than a second?
> > 
> > I don't think we want to noticeably slow down Vim for everyone all
> > the time in order to more-conveniently avoid an error that is
> > observed once in 15 years.
> > 
> 
> We have this situation:
> 
> 1. user opens a file
> 2. (user does some edits)
> 3. user tries to write the file, gets a conversion error
> 4. user uses :q!, attempting to abandon all changes
> 5. user loses ENTIRE CONTENTS of file
> 
> I think I'd accept a slow-down in this case!

If a slow-down was the only solution, sure.  I had the impression
from the earlier discussion that the problem was avoidable by
reading the error message and being careful.  Hence my description
of the fix as one that would allow the error to be more conveniently
avoided.

> Granted, the user should have paid attention to the big message
> saying "don't quit the editor until the file is successfully
> written!", however, it may not be clear in the slightest how to
> successfully write the file. What if somebody is editing a huge
> file (and thus has undolevel set really low), pastes several
> hundred lines of text from outside Vim, within which a single
> character is invalid for their current encoding, and then realizes
> they cannot write the buffer? My first instinct would be to
> abandon all changes, but apparently that's not going to work here.

As I understand the problem, they also had to have 'nobackup' and
'nowritebackup' set, the latter which is not the default.  So the
user threw away the safety net, disregarded the warning sign, and
because of this I have to wait longer each time I write a file?

Of course, if the slowdown is negligible, then there's probably no
reason not to go with Christian's change.

Regards,
Gary

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

Reply via email to