I am having problems with the wrong indentation of my php code ...
I would like my code to look like this
if (foo)
{
print "i am indented";
}
but it always looks like this:
if (foo)
{
print "i am not indented correctly";
}
I got tired of Google for things like this and tried to add the following to my .emacs, but that didn't work at all.
Any thoughts?
(add-hook 'php-mode-hook
(function (lambda ()
;; GNU style
(setq php-indent-level 4
php-continued-statement-offset 4
php-continued-brace-offset 0
php-brace-offset 0
php-brace-imaginary-offset 0
php-label-offset -4))))
Jon
source
share