On Thursday, April 3, 2014 10:33:38 AM UTC-5, Dmitry Frank wrote: > Consider a simple example: say, I just typed foo, then pressed Left key, and > typed bar. Now I have fobaro. > > > When I press . key, only bar part is repeated, and the same is with undo. > > > > So I want the whole fobaro to be repeated when I press ., and to be undid > completely at once when I press u. > > > I'm just writing plugin ( auto-pairs-gentle ) that does some tricks like > that, and I want it not to break undo history. > A couple of months ago I asked that on stackoverflow: > http://stackoverflow.com/questions/20863411/vim-concatenate-two-actions-into-one-to-make-it-repeatable-by-and-undoable > , > > > > I know about :undojoin , but it can only solve undo problem, not repeat > problem. That would be ideal if we have some command to join last two > actions, that would be great help for plugins like that.
Not breaking undo or repeat on auto-pair plugins like this is something that once had ugly hacks you could do to accomplish it. Delimitmate implemented these. But sometime right before 7.4 was released, a bug was fixed which made all those hacks not work anymore. I think they relied on setline() not breaking the undo sequence or something. I would really like to see an insert-mode command that would be like the inverse of <C-G>u which currently breaks the undo sequence manually. The new command would suppress breaking the undo sequence for the next command, so you could do something like ifunc()<C-G>U<Left>arg<Esc> to get a single change for undo/redo/repeat rather than 2 separate changes and a broken repeat. -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.