Hi Andy, Christian,

Thanks for your reply.
Please see my comments below.


On Tue, Nov 17, 2009 at 12:48 PM PST, Andy Wokula wrote:

... Text Deleted ... 

AW> > Another possibility would be for 'undofile' to be a string variable with
AW> > possible choices being something like "read, write, both".  Where "both"
AW> > is the default for backward compatibility.
AW> >
AW> > Regards,
AW> 
AW> What about checking the modified option?  (very pseudo cody ...):
AW> Undo one step, undo more steps until the buffer is not modified -- "not
AW> modified" is assumed to be the case when starting to edit a buffer.
AW>     undo
AW>     while &modified && CanUndo()
AW>        undo
AW>     endwhile
AW> (or wrap :undo in a try-block which :breaks on error)
AW> 
AW> 
AW> Or check this script:  undo_tags
AW> http://vim.sf.net/scripts/script.php?script_id=1997

Thanks for this link, I'll check it out.

In general however, I would like to use the patch without being
dependent on another plugin or creating other workarounds.  For me, it's
easier and more straightforward to configure the particular
functionality via its embedded options.  Rather than being dependent on
other things as well.  I know that's not always possible and I have a
ton of "customizations" that I use; but I still prefer to minimize the
workarounds because it's getting hard to remember all the nuances of my
configuration :)

Regards,

-- 
Mun


AW> Or try to use an autocommand:
AW>     :au BufRead * let b:undo_start_nr = changenr()
AW>     :com! Revert exec "undo" b:undo_start_nr
AW> 
AW> 
AW> This is untested, and I don't know what will work together with the
AW> patch.  But I'm sure there will be a way without the need to add more
AW> Vim options.
AW> 
AW> -- 
AW> Andy
AW> 
AW> AW> 


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui