VIM : copy and paste reformats the text with lots of spaces

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:
This entry was posted in Linux and tagged . Bookmark the permalink.

One Response to VIM : copy and paste reformats the text with lots of spaces

Leave a Reply

Your email address will not be published. Required fields are marked *