Next: , Previous: Completion, Up: Top


8 PHP Comments

The usual commands for inserting, managing and editing source code comments in Emacs1 and Emacs's C mode2 are supported in PHP mode. The following noteworthy commands are useful for working with PHP or are extensions expressly provided by PHP mode.

M-;
Insert comment at point (comment-dwim). If comment already exist, indent comment (comment-indent).
M-j
Insert a newline in a comment on the next line with the comment starting at the same column as the current line (c-indent-new-comment-line).
C-x ;
Set the current column as the column to start comments from in the buffer (comment-set-column). This affects the variable comment-column.
C-c C-c
Comment out the current region (comment-region). If region is already commented, the region is uncommented.
M-- C-x ;
C-u M-;
Kill the comment on the current line (comment-kill called by comment-set-column or comment-dwim).
C-u n M-;
Kill the next n comments (comment-dwim).
M-x comment-box
Surround region with comment characters.

Footnotes

[1] See Manipulating Comments.

[2] See Comment Commands.