Pasting text in terminal VIM
Pasting code into a VIM running in terminal has never worked properly for me. It occured to me that Google might have some information on the topic. It turned out to be ridiculously easy:
:set nopaste
Paste your code, and then:
:set paste
Ref.: vim.org.