Next: , Previous: Electricity, Up: Top


4 Motion

The traditional point movement commands for Emacs1 and Emacs's C mode2 are supported in PHP mode. The following are noteworthy commands for working on PHP code or are extensions expressly provided by PHP mode.

C-M-f
Move forward past the current syntax (forward-sexp). If point is in a string literal, move to the end of the string. If point is at the beginning of a parenthetical expression, move to the end of it. If at the beginning of statement block that is surrounded by braces, move to the end of the block. If point is at an identifier, skip to the end of it.
C-M-b
Same as C-M-f, except a syntactic element move to its beginning (backward-sexp).
C-M-a
Move point to the beginning of the top-level function definition (c-beginning-of-defun).
C-M-e
Move point to the end of the top-level function definition (c-end-of-defun).
C-M-<HOME>
Move point to the beginning of the current function (beginning-of-defun).
C-M-<END>
Move point to the end of the current function (end-of-defun).
M-m
Move to the indentation at the beginning of the line (back-to-indentation).
C-c C-w
Enable word motion across mixed case identifiers with forward-word and backward-word commands (c-subword-mode).
Most movement commands support prefixing the command with a numeric argument by using Emacs's universal argument command. Type C-u n, where n is the number of times to repeat a command. If no number n is provided, Emacs will repeat the command 4 times by default. See Numeric Arguments.

Footnotes

[1] See Changing the Location of Point.

[2] See Movement Commands.