Search code examples
phpemacsphp-mode

Let's share our emacs php configs


I'm pretty new to emacs and I think it would be nice if you share your config that you use in your everyday php work.


Solution

  • that's enough for me, just indentation rules for some project based on kohana:

    (add-hook 'php-mode-hook
              (lambda ()
                (c-set-style "bsd")
                (setq c-indent-level 2)
                (setq c-continued-statement-offset 2)
                (setq c-brace-offset -2)
                (setq c-argdecl-indent 0)
                (setq c-label-offset -2)
                (setq c-basic-offset 2)
                (setq tab-width 2)
                (setq indent-tabs-mode nil)
                (c-set-offset 'case-label '+)
                (c-set-offset 'arglist-close 'c-lineup-arglist-operators)
                (c-set-offset 'arglist-intro '+)
                (c-set-offset 'arglist-cont-nonempty 'c-lineup-math)))