让我们分享我们的emacs php配置

zer*_*kms 6 php emacs php-mode

我是新手emacs,我认为如果你分享你在日常php工作中使用的配置会很好.

小智 3

这对我来说已经足够了,只是一些基于 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)))
Run Code Online (Sandbox Code Playgroud)