When I paste a piece of code or text from a copy (or the clipboard), lots of extra spaces are added at the start of each new line.
The solution is to turn off the autoindent:
:set paste |
After you pasted your code, turn off the paste-mode:
:set nopaste |
Please follow and like us:
One Response to VIM : copy and paste reformats the text with lots of spaces