I want prevent Vim from following behavior: if I'm editing source code file and type a comment in Vim and press Enter or O, it will automatically start the next line with //, so it looks like this:
// this is a comment
//
These commands: :set formatoptions-=r, :set formatoptions-=o help, but only when I run them in Vim, but when i put this line set formatoptions-=or to the end of my vimrc file and restart Vim nothing happens so I need run them manually from editor every time I open new file.
Why addition of aforementioned line to the vimrc file has no effect?