`:set paste` should do the trick.
`#` denotes a commented line in your file.
`:set paste` will turn off auto-indenting and auto-commenting, which will allow you to copy and paste things into vi without vi automatically adding comments to the beginning of lines after a line you are pasting that has a comment.
You can run `:set nopaste` again to turn the setting back off.