/**
* Example Comment
*/
When I press enter after Comment Vim autoindents but leaves the cursor lined up with the * characters. How can I get Vim to add the * and a space so that my comment lines up with the E?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will want to modify the value of the
formatoptions(short namefo) Vim option, like this:The
roption enables the behavior in insert mode;oenables it when using o or O in normal to switch into insert. Try Vim’s builtin help for details: