Poor man’s multi cursor in VIM

I tried vim-multiple-cursors but it was just doing weird things and not replacing the right words, so after digging around for a while I came up with this:

Simply add it to ~/.vimrc.

Basically it's the same as using alt+f3 in Sublime Text.


Pasting in VIM from KDE’s clipboard

For some reason I couldn't find it anywhere, but the register for the KDE clipboard ( ctrl-c / ctrl-v) is + not *.

To paste from the KDE clipboard in insert mode : CTRL-R +, in normal mode : "+p.

To map it to ctrl-v : :imap <c-v> <c-r>+, this way you can just press ctrl-v in insert mode to paste the system clipboard.

To paste from the system selection (mouse middle button) in insert mode : CTRL-R * or in normal mode "*p .

To paste from the VIM buffer in insert mode : CTRL-R ".

To set the system clipboard as the default clipboard for vim (for yy,dd,cc,p) : :set clipboard=unnamedplus .

Also make sure to check :registers .