How to disable automatic comment insertion in Vim? Add to ~/.vimrc:au FileType c,cpp setlocal comments-=:// comments+=f:// More: http://vim.wikia.com/wiki/Disable_automatic_comment_insertionRelated posts:How to make case insensitive search in Vim/Vi Auto completion in Vim Vim: Pasting text as is in Vim in Paste Mode Vim: case insensitive search How to manually set Vim’s filetype? How to move cursor to a specific byte in Vim? How to make Vim indent C++11 lambdas correctly? How to write file content with sudo in Vim?