Copy whatever you like, in Vim, press Shift+Insert
to paste content in clipboard into file. Make sure you are in Insert Mode
. It works well in Ubuntu 12.10 as long as I tried.
EDIT
Before the paste, it is recommended to enter the paste mode
(by :set paste
) of vim in case you meet some un-wanted feature like incorrect auto-indent. (Thanks to @DmitryFrank)