Bram Moolenaar schrieb:
>
> Alexei Alexandrov wrote:
>
>> I'd like to request a feature in Vim which would be useful not very often
>> but
>> is very important I think.
>>
>> Usually I don't lose information in Vim. You can undo things, you can
>> restore
>> the file from a backup etc. There is only one situation which led me to
>> information loss several times. This situation happens when I have a file
>> with
>> modifications opened in Vim and then I also change this file by accident
>> outside of Vim. In this case Vim shows a message box with 2 buttons: reload
>> file or don't reload file. Several times I pressed "reload file" by
>> accident.
>> And my changes in Vim were lost! Undo didn't work after that.
>>
>> I don't know if it's difficult to implement but it would be great if undo
>> worked after such reload. And this would be useful not only for "by
>> accident"
>> cases - I could also press "reload" just to see what those external changes
>> are
>> and then undo if I don't need them.
>
> I'll put it in the todo list. However, don't expect it soon. I think
> the only right way to implement it is to do a diff between the buffer
> text and the file that is to be loaded. The difference would then be
> stored as a change in the undo buffer.
Already there (todo.txt from 2007 Oct 30) as well:
8 See ":e" as a change operation, find the changes and add them to the
undo info. Needed for when an external tool changes the file.
>> P.S. Persistent undo would be great too. :)
>
> That's already in the todo list.
--
Andy
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---