Am 30.09.2012 14:42, schrieb Bram Moolenaar:

Christian Brabandt wrote:

Bram,
attached patch implements undo when doing :s/.../.../gc

This has been requested recently in
https://groups.google.com/group/vim_dev/msg/9930ef0f86421814

And I think, I saw a request like this on the sf.net bug tracker, but I
can't find it right now. Additionally, I also added using Ctrl-L for
redrawing the screen as I found this useful.

Yeah, this is useful.  But also tricky, if the undo is done wrong then
the text may get messed up.  Can you think of situations where something
could go wrong?  And it would be nice to have tests for that.

What about a replacement function that edits text?


com! InsaneSubst :%s/\w\+/\=InsaneEdit(submatch(0))/

func! InsaneEdit(str)
    $put = a:str
    return '('. a:str. ')'
endfunc

--
Andy

--
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

Raspunde prin e-mail lui