On Wednesday, August 5, 2015 at 11:55:12 AM UTC-5, [email protected] wrote:
> > For search and searchpair, you should be able to call those *without*
> > moving the cursor to get a position, and then (if it's in the same
> > line) generate movement sequences to get there. Not exactly elegant
> > but it should work (for single lines).
> 
> I was expecting to be able to exploit the patch for snippets
> like "{\n<+cursor+>\n}<+jump-position+>", or simply "if (cond)\n{..."
> 
> Of course, it's stupid to redo the exact same control-statement,
> and yet, it would have been useful in some copy-paste like cases.
> 
> Anyway.
> 
> Thank you all for the patch. I'll see how I can exploit it.
> 
>

If you're satisfied with keeping undo/redo and are OK with sacrificing repeat 
with '.', you can use undojoin. I use this mapping for example:

inoremap <silent>   {<CR>      {<CR>}<Esc>zv:undojoin<CR>O 

-- 
-- 
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/d/optout.

Raspunde prin e-mail lui