Try to insert following text into your fully configured vim using Shift-Insert :

{ { { # madness! } } }

Then, compare with following gif.

You can use Shift+Insert now

How many times you do following sequence in vim?

<C-O>"*p

Or, if you smart one, this one?

<C-R>*

However, remote vim leaves you no choice.

:set paste <S-Insert> :set nopaste

urxvt-vim-insert into the rescue

Just install this urxvt perl plugin, restart urxvt and all following Shift-Inserts will paste text as it expected to be done in XXI century.

It will also work onto remote server vim. Waow.

What’s difference with "bracketed paste?"

"Bracketed paste" requires plugin for vim and intended for pasting in vim only.

urxvt-vim-insert is a plugin for terminal and redirects any paste to the new vim session, which can be used for the remote sessions as well. E.g., you can safely paste multiline text directly into remote unconfigured vim and it will work nice.

urxvt-vim-insert can be used for pasting multiline text in local or remote shell.

Little bit complicated (due stupid tmux API). When I will press Shift+Insert to paste something not into vim and clipboard contains more than one line, it will popup new vim instance with clipboard contents, so I can edit it before pasting.

Result of using that simple script can be seen on the gif above.

URxvt.safe-paste.command

This parameter is mandatory and should point on the executable, that will be launched by urxvt synchronously , so it should fork to not to hang your terminal.

That executable will get two parameters:

urxvt PID for the first parameter ( $1 ).

temporary file name with current clipboard contents as it’s second parameter ( $2 ). This file should be removed by executable when editing is complete.