Vim: auto-comment in new line
- by padde
Vim automatically inserts a comment when I start a new line from a commented out line, because I have set formatoptions=tcroql. For example (cursor is *):
// this is a comment*
and after hitting <Enter> (insert mode) or o (normal mode) i am left with:
// this is a comment
// *
This feature is very handy when writing long multi-line…