Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pasting from system clipboard in insert mode and then repeat (.) fails

I'm in in MacVim, but I'm guessing this applies to gVim as well. In insert mode, if I paste from the system clipboard -v then get out Esc then repeat . all it does is move the cursor back a space. It's not registering the system paste as part of the keystrokes I typed.

Strangely, if I type -v in normal mode, I can hit . after to repeat it and it works fine.

I know I could type <c-r>*, but that is bad.

I tried inoremap <D-v> <c-r>* but it seemed to have no effect.

like image 966
Andy Ray Avatar asked Nov 04 '22 19:11

Andy Ray


1 Answers

Try putting this in your ~/.gvimrc:

inoremenu Edit.Paste <C-r><C-p>*
like image 191
Conner Avatar answered Nov 15 '22 06:11

Conner