Emacs で PHP環境を整えてみるメモ
- 補完
- 構文チェック
- fuelPHP とかインデントはタブらしいんでタブに
インストール
init.el
(add-to-list 'ac-modes 'php-mode) (setq php-mode-force-pear t) (add-hook 'php-mode-hook '(lambda () (setq tab-width 4) (setq indent-tabs-mode t) (setq c-basic-offset 4) (c-set-offset 'case-label' 4) (c-set-offset 'arglist-intro' 4) (c-set-offset 'arglist-cont-nonempty' 4) (c-set-offset 'arglist-close' 0) (flymake-mode t) (require 'php-completion) (php-completion-mode t) (make-local-variable 'ac-sources) (add-to-list 'ac-sources 'ac-source-php-completion) (add-to-list 'ac-sources 'ac-source-filename) ))