In VIM, when you copy and paste text from a GUI application (e.g., firefox), VIM may insert a lot of extra white spaces by indenting the code automatically. The rendering is sometimes completely wrong, or you just do not want this feature. To prevent it, you need to set the paste option on:
:set paste
Now press i to switch to insert mode and paste your code. Once done, you may disable this by using:
:set nopaste
Please follow and like us: