Vim is adding lots of spaces and newlines when copy / pasting. This is what it looks like:

How do I fix this?
|
|
Gedit is using 4 spaces per indent, your VIM looks like it's using 8 spaces per indent. There's nothing wrong, just a simple setting difference. Look up the options:
will make your VIM look like your Gedit. |
|||||||||||||
|
|
I assume you're pasting from the clipboard or something? Try The first thing I do on any new machine is put Edit:
And you can use |
|||||
|
|
you probably have vim's autoindent mode on. try turning it off with also, as mentioned by CR above, |
|||
|
|