On Sat, November 14, 2009 10:47 pm, John Beckett wrote: > Tim Chase wrote: >> :%d >> :r % >> :1d >> >> which (1) deletes all the content, (2) reads in the content >> from disk below the one blank line remaining, and then (3) >> deletes the spurious blank line. >> >> The above could be wrapped in a function/command/mapping and >> then used in place of ":e!" to "reload" the file in the same setup. >> Your undo should then walk back beyond this "reload". > > That's exactly what this tip does: > http://vim.wikia.com/wiki/Reload_file_without_losing_undo_history
You could possibly also try out the persistent undo feature. But for this you need to patch the vim source and compile yourself. See http://groups.google.com/group/vim_dev/browse_frm/thread/b23d563bffcec9b5 for the thread at vim_dev and you might get the source from the vim_extended git repository available at http://repo.or.cz/w/vim_extended.git (I am not sure, if this feature is in that source tree). regards, Christian -- :wq --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
