1

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:

  1. Can I disable continuation of comments to the next line in Vim?
  2. 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.

felwithe
  • 834
  • most likely filetype plugins have enabled/changed your formatoptions after loading the filetype. So you would need to disable filetype plugins. Alternatively, you can possibly make use of the Optionset autocommand, to disable this whenever some script re-enables it. – Christian Brabandt Sep 23 '19 at 14:56
  • Did you ever find a solution? – ACD Jun 25 '20 at 19:06
  • 1
    @ACD No, I didn't. But I can tell you that this is on Cygwin, and it doesn't happen in my Windows Vim or Linux either. I will edit my problem to say that it's specifically in Cygwin. (I ended up cutting back my use of Cygwin altogether because it just has too many problems.) – felwithe Jun 25 '20 at 23:09

0 Answers0