When I make a single line comment (a line starting with a hash mark # in my case, although obviously varies), Vim begins the next line with a hash mark too. I want to stop that.
This is in Cygwin, which I mention because I have never had this problem in Windows Vim or Linux either.
These answers from Stack Overflow and Superuser do not work:
- Can I disable continuation of comments to the next line in Vim?
- https://stackoverflow.com/questions/38750012/prevent-vim-from-starting-line-with-pound-sign
They say to add lines to your .vimrc
set formatoptions-=r
set formatoptions-=o
Or to manually enter :set formatoptions-=cro while in Vim. Neither work.
There are other comments saying the answer does not work aside from mine, so it's not just me. Either those fixes do not work on all systems, the fix has changed in 2019, or something else is up.
Optionsetautocommand, to disable this whenever some script re-enables it. – Christian Brabandt Sep 23 '19 at 14:56