CAUTION!! this is still experimental.
Support alignment (e.g. align, align-current) for PHP.
Put this file into your load-path.and the following code into your ~/.emacs
(add-hook 'php-mode-hook
(lambda ()
(require 'php-align)
(php-align-setup)))
$foo = "string"; // M-x arign-current
$looooooooong = 1; //
$foo = "string"; // M-x arign-current
$looooooooong = 1; //
"$foo = 1";
$foo = "string"; // M-x arign-current
$looooooooong = 1; //
$bar = 2; //
"$foo = 1";
$foo = "string"; // M-x arign-current
$looooooooong = 1; //
$bar = 2; //
$variable = 1;
$vars = array(); // M-x align-current
if ($variable == $vars) {
}
$variable = 1;
$vars = array(); // M-x align-current
if ($variable == $vars) {
}
$vars = array(
1, 2, 3,
4, 5, 6,
7, 8, 9,
10, 11, 12, // C-u M-x align-current
);
$vars = array(
1, 2, 3,
4, 5, 6,
7, 8, 9,
10, 11, 12, // C-u M-x align-current
);