Insert-mode features
The Vimrc Project
This page is part of the documentation for the vimrc project. For other documentation pages, check the links in the sidebar or go to the top documentation page.
Comments
When editing a PHP file, start an in-line comment as usual:
// This is a comment. // This is a comment.
// // This is a comment.
// This is the second and last line of the comment.
// <C-U> (i.e., CTRL-U: hold down the Control key and type "u".)
Start a documentation block by entering /** and start a new line. The comment leader will be inserted automatically, with the correct indentation:
/**
* The first character I typed on this line was "T".
*
* A space was added automatically on the previous line and this one.
* The space on the empty line was removed automatically.
* / and vim will give you the correct **/.