If you are using the GUI version, you really should paste from either the clipboard register ("*
) or the X11 selection ("+
), as already suggested by echristopherson. So instead of middle-clicking or whatever, you navigate where you want to paste and then type "*P, including the initial quote. When pasting via the p or P commands, vim knows that you are pasting, hence the 'paste
option is unnecessary—no matter from which register you are pasting.
If you are pasting from the terminal, vim doesn't really have a say in the matter. The terminal emulator will dump whatever you have instructed it and in most cases vim cannot differentiate whether the characters that keep coming in are you typing or you pasting. Hence you need to set 'paste
to tell vim that it shouldn't do indenting and stuff.
As a consequence, if you are pasting from the terminal, all the characters that are to be pasted are queued in one go and are essentially already sent to vim, so there is really nothing that you can do to interrupt it. From the point of view of the terminal emulator, CTRL+c is but an ordinary character, therefore it gets queued behind all the other stuff that is waiting to be pasted. When vim finally gets to see the CTRL+c, it is too late, as there is nothing to be aborted anymore.
( Update: Depending on the terminal emulator, CTRL+c and similar signals may be sent in a prioritised way. Specifically, I've noticed this in Putty, which delivers the break signal instantly and indeed allows me to abort misplaced lengthy paste operations. I don't really know how this works, though. )
Long story short: If at all possible, use "*P or "+P to paste (which even works in some terminal emulators if I recall correctly). This is the "correct" way to paste; everything else is basically a workaround gives you those kinds of headaches.
+
register, e.g."+P
. (Or, in X11, use the*
register to paste whatever was last selected; the same text you would get if you middle-clicked into most X apps.)*P
doesn't seem to paste the right things... Neither highlighted text nor ctrl+c content are pasted (it pastes some other data which I don't know where it's coming from).*P
?