On Jun 6, 2:02 pm, Sergey Vakulenko <[email protected]> wrote:
>
> Like true vimmer, i love use vim constantly in all my projects. I use
> it with visual studio, svn and perforce. Sometimes, these external
> applications changes files opened in vim, and after 'file reload'
> function i lose my undo change tree. I payed no mind on that till i
> miss my files after unsuccessful perforce merge. i can't  revert my
> changes, as result i was forced to repeat my changelist from the
> begging. if i can in this moment revert only to one step undo, this
> will be save my situation.
> i found interesting article, which propose simple hint to reload file
> without lose undo 
> tree.http://vim.wikia.com/wiki/Reload_file_without_losing_undo_history
>

I was going to suggest using that tip.

> But i didn't find a way to integrate this feature like a handle for
> 'file reload' function. How to resolve this problem?
> Maybe there is more delicate solutions to avoid lose history of undo
> steps ?
>

You can use the command defined in the tip, with the FileChangedShell
autocmd event.

See the :help, obviously, and also the few tips we have on the wiki
for examples of use:

http://vim.wikia.com/wiki/Special:Search?search=filechangedshell

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