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:
:set formatoptions-=cro
This reads, disable following:
After that copy/paste works as it should.
Mon | Tue | Wed | Thu | Fri | Sat | Sun |
---|---|---|---|---|---|---|
← Back | December '24 | |||||
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
sadashiv jiil on :
Jari Turkia on :
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
Christian on :
Jari Turkia on :
Christian on :
Jari Turkia on :
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.
Christian on :
Jari Turkia on :
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.
Christian on :
Jari Turkia on :
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?
Christian on :
Jari Turkia on :