Auto-comments are the most annoying "feature" of text editors and IDEs for me.
I've searched -- nay, scavenged -- high and low to figure out how to get rid of literally any semblance of automatic comment continuation, and for whatever reason it's proving impossible and incredibly annoying.
Right now, I have tried the following three lines, which works for most languages.
autocmd BufNewFile,BufRead,FileType * set formatoptions-=cro
autocmd BufNewFile,BufRead,FileType * setlocal formatoptions-=cro
au FileType c,cpp setlocal comments-=:// comments+=f://
But whenever I open a file that isn't considered C++ at first (i.e. not the correct extension) and use setf cpp
, all auto-comments seem to come back to haunt me.
Even sometimes opening a known-to-be-C++ file, this still happens. I'm not sure what the cause is, but it's aggravating.
How on Earth can I tell vim that I really truly do not want auto-comments, ever, under any circumstances? I feel like I've been plagued by this for years.
'commentstrings'
to (un)comment blocks of code, and it'll completely disable plugins that define what they provide in ftplugins. For instance, in lh-cpp I define the doxygenating command:DOX
in an ftplugin. I understand that some default settings don't suit us, however without ftplugins, vim would be quite crippled for programming tasks. They were the huge improvement of Vim 6.