Is it possible to paste in insert mode in Vim?
While in insert mode hit CTRL-R {register}
Examples:
CTRL-R *
will insert in the contents of the clipboard CTRL-R "
(the unnamed register) inserts the last delete or yank. To find this in vim's help type :h i_ctrl-r
Yep, I only recently learned of CTRL-R and it's extremely useful.
CTRL-R *
only works in GVIM or versions that are compiled to interact with x. Typevim --version
and look for+xterm_clipboard
. If you don't have that, you need a different version of vim. (vim.wikia.com/wiki/Accessing_the_system_clipboard)You actually only need
+clipboard
, but if you have+xterm_clipboard
you should have that anyway. On some OSsxterm_clipboard
isn't applicable.Hmm, I use C-r+ to paste from system clipboard on Windows (using GVim portable)? Never heard of * register.
@kitsu.eb On X systems
*
register is pastable with middle-mouse-click while+
is the traditional copy/paste. standards.freedesktop.org/clipboards-spec/clipboards-latest.txt