As I read on this blogpost I am not the only one who has problems pasting code or text into vi editor.
“Instead of looking like you want it to, it takes every tab and just autoindents like crazy giving you a mess to clean up.” Yes, thats true. Just see the above mentioned blogpost.
The solution is easy:
Before pasting enter in vi
Please notice the message
on the bottom of vi. Now you can paste your code or text into vi without having to clean the added indents.
After finished pasting just enter