I want to automatically generate block comments for documentation using vim.
Something like:
/**
* comment
*/
are there any plugins for this?
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.
Vim has this functionality built-in. See
:help format-commentsfor details. Basically if you havefiletype plugin onin your ~/.vimrc and are using a bracket language (like C, C++, Java, javascript, etc.), you can type/**<cr>and it will expand to:where
_is the cursor position. When you’re done with the comment block just hit/to end it.