On Tue, Apr 11, 2006 at 01:06:11PM +0200, Christoph Nodes wrote: > > > > > > Is there a way to avoid that the changes a specific command makes > > > are added to the undo history. I am missing something like > > > histdel("undo", -1). "Set undolevels = -1" is no choice since I > > > don't want to lose the changes I made before. > > The reason for my question is our way of handling the > "Gtk-Utf-8-String-problem": Gtk-2.0 functions take UTF-8-encoded > strings as arguments. For constant strings coded into the source code > this can be a problem if you use characters not included in the ascii > character set and you don't want to have UTF-8-encoded source files. > Our way is to let vim do the encoding and call a vim function on every > BufReadPost and BufWritePre event that uses iconv() to convert these constant > strings. These changes however, are changes that we don't want to undo/redo. > > Christoph
If you are using vim 7.0 (still in beta testing), then you may be able to accomplish what you want with :undojoin . :help :undojoin HTH --Benji Fisher