Hi,

I have been notified of two insert mode paste problems in MacVim which
I assume also apply to all other GUIs.  When I say "paste", I mean
"paste using the menu Edit->Paste, or the toolbar".

1. In block mode, assume the + register contains "HI" and your buffer
looks like

aa bb
aa bb

Enter block-wise visual mode and select the block of "b"s.  Hit I,
paste, then Esc.  The result is

aa HIbb
aa bb

even though it should be

aa HIbb
aa HIbb


2. Assume the + register contains lines of text (i.e. with <CR> in
there somewhere) and your buffer is

a b

Now put cursor on the "b", hit i, then paste.  The result is

the lines
of text that was
in your + register
a b

when I (and several others) expect it to be

a the lines
of text that was
in your + register
b

or something like it (it would be nice with no newline before the
"b").  The point is that the text should be insert in between the "a"
and "b" if the cursor was there when you pasted.


Now for some solutions:

a) use <C-R>+ to paste:  this works but lines of formatted text
usually ends up being a complete mess afterwards (the indentation
changes)

b) use <C-R><C-O>+ to paste:  this fixes 1 but not 2, formatting is ok
though

c) use <C-O>:set paste<CR><C-R>+<C-O>:set nopaste<CR>
this seems to fix all situations


Does anybody have any comments on (c)?  Improvements?

Why is (c) not the default for pasting in all GUIs?  Or something
similar...?


Björn

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

Reply via email to