How do I automatically insert comment leaders while typing comments?
‘formatoptions’ option. :set formatoptions+=ro You may also want to add the ‘c’ flag to auto-wrap comments using the ‘textwidth’ option setting and the ‘q’ flag to format comments with the “gq” command: :set formatoptions=croq For more information, read :help 30.6 :help format-comments :help ‘comments’ :help fo-table ============================================================================= SECTION 28 – QUICKFIX 28.1.
How do I automatically insert comment leaders while typing comments?