Disabling Automatic Comment Insertion in Vim
When you’re editing code in Vim and press Enter after a comment line, Vim automatically continues the comment on the next line. This is useful sometimes, but often gets in the way. Here’s how to disable it. The Basic Approach Add this to your ~/.vimrc: au FileType c,cpp setlocal comments-=:// comments+=f:// This works by: comments-=://…
