Is it just me or is vim's automatic comment continue to the next line completely unnecessary? Every time I copy/paste anything into vim it makes the smart choice and completely messes up the code. And this is enabled as a default! WTF?
Something like this will help:
This reads, disable following:
- Auto-wrap comments using textwidth, inserting the current comment leader automatically
- Automatically insert the current comment leader after hitting <Enter> in Insert mode
- Automatically insert the current comment leader after hitting 'o' or 'O' in Normal mode
After that copy/paste works as it should.
More info regarding this formatting-thingie at https://vi.stackexchange.com/questions/1983/how-can-i-get-vim-to-stop-putting-comments-in-front-of-new-lines/1985
My exact problem is, that the tool I chose for a task tries to outsmart me. I need to regain control. I, the human, make the decision if next line is a comment or not. Not my editor. I absolutely don't care if I'm typing, pasting or doing whatever, trying to outsmart me and guessing wrong is offensive. The OTHER tools I have do not do that. Especially not for pasting text.
My latest (https://blog.hqcodeshop.fi/archives/442-Vims-comment-line-leaking-fix!-Part-3.html) from yesterday is about what you just said. Configuring the system to my own liking.
If you study the particular issue with formatoptions and file-types, you will find that getting Vim to do what I and lot of other people want is far from trivial. However, I did my research and published my findings in the mentioned blog post. You and many others, simply assume, that getting rid of formatoptions is easy. It is not. Or ... if I'm over-complicating this, feel free to point me to a simpler solution.
Since you're an advanced Vim-user, can you answer me this: How can I keep the file-type plugin while disabling the ridiculously stupid formatoption?