On Feb 17, 2014 3:19 PM, "Yan Shoshitaishvili" <[email protected]> wrote: > > > let ul=&undolevels " save previous undolevels > > let win = winsaveview() " save cursor position > > > > setlocal undolevels=-1 " disable undo > > setlocal expandtab > > retab " convert tab to space > > setlocal noexpandtab > > exec 'setlocal undolevels='.ul " restore undolevels > > > > call winrestview(win) " restore cursor position > > My understanding is that that'll delete the whole undo history, and that's what seems to happen when I try it out. Is there any way to keep the rest of the undo history intact with this approach?
Use undojoin as you already were, but wrap it in winsaveview() / winrestview(). Justin M. Keyes -- -- You received this message from the "vim_dev" 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
