Chris Smith wrote:
Hi Everyone,
I'm new on the mailing list so please let me know if there's conventions I
should be following or something that I'm not doing when posting here.
My question is in regards to pasting chunks of text that have been copied
from blockwise selections in gvim. In gvim 6.x, when I paste a blockwise
selection, it gets pasted into the middle of the text at the position of the
cursor (eg: the text of the first line of the copied text is pasted at the
cursor, the second line is pasted at the same cursor position but on the
line below etc). In gvim 7, this appears to have changed. When I paste a
blockwise selection, the text is inserted before the current line. This is
quite frustrating as 99% of the time the reason for doing me doing a
blockwise selection was to paste it into the middle of some other text.
I'm running gvim 7.0 under Windows XP.
I had a brief look through the new scripts and things that come with version
7 and noticed that the paste mappings have moved from the mswin.vim script
to a separate autoload script. I had a go at moving them back, just to see
if the autoload script wasn't being run for some reason, but it didn't seem
to help.
Is there any way I can get the old pasting behaviour back?
Thanks for any help,
Chris
Do you mean blockwise or linewise? Are you pasting with p (put after cursor)
and P (put before cursor) or with the menus (Edit.Paste, which, IIRC, has
always been equivalent with "+P i.e. put-before from clipboard)?
I recommend not using mswin.vim, which sooner or later will make you stumble
on your own feet; I recommend not even sourcing it, but rather doing things
"the Vim way":
To yank the current visual area, use y
To yank it to the clipboard, use "+y (quote, plus, y-for-Yankee).
To delete it (and retain a copy in the default register) use d
To delete it (and retain a copy in the clipboard) use "+d
To put the default register before the cursor, use P
To put the clipboard before the cursor, use "+P
To put the default register after the cursor, use p
To put the clipboard after the cursor, use "+p
All of these are Normal-mode commands. To invoke them from Insert-mode, prefix
each of them with a CTRL-O (which means "execute one Normal-mode command then
come back to Insert mode").
Best regards,
Tony.