Thursday, September 12, 2013

Re: block mode paste feature

shawn wilson wrote:
> Can vim be made to DWIM here? I did a quick search and found I'm not
> the only one who has run into this. For example:
> http://briancarper.net/blog/341/
>
> Just to re-explain what I want: when you visually select a block, you
> can change or insert and it will change the block but when you paste a
> single line buffer (I can see how this might get not be so simple for
> pasting multiple lines) it only changes the first line. The "fix" of
> using C+R in insert mode as was mentioned works, but the behavior
> isn't what I expect.
>
Seems to me that you could set up a pair of vnoremaps (of p and P) to do
what you want:

vn P I<c-r>"<esc>
vn p A<c-r>"<esc>

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: