On Sun, May 10, 2009 at 4:28 AM, Tony Mechelynck < [email protected]> wrote:
> > On 10/05/09 08:14, Anton Sharonov wrote: > > > > 2009/5/7 Tim Chase<[email protected]>: > > ... > >> If I'm not sure, I'll often yank my current copy into a scratch > >> buffer/window, force-reload the file from disk, and then use > >> > >> :diffthis > >> > >> on each of the two buffers/windows to verify that there are no > >> surprises. > > > > I have found, that the most comfortable way to do this is > > DiffOrig command, described in the VIM help (you should define it > > self though). One this command does the something very similar to > > all those copy/paste/force reload/diffthis stuff. > > > > :help DiffOrig > > > > If, like mine, your vimrc sources the vimrc_example.vim, then you > already have it. > > > Best regards, > Tony. > Random; but I liked this command; so wrote a little wrapper to toggle it... (broken if you change buffers I know, but my scripting is horrible at best for vim) function! DiffOrig() if &diff wincmd p | bdel | diffoff else vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis endif endfunction map <leader>do :call DiffOrig()<cr> --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
