Skip to content

Instantly share code, notes, and snippets.

@ebisawa
Created December 11, 2013 11:10
Show Gist options
  • Save ebisawa/7908607 to your computer and use it in GitHub Desktop.
Save ebisawa/7908607 to your computer and use it in GitHub Desktop.
php-mode settings
;; php-mode
;(setq php-mode-force-pear t)
(add-hook 'php-mode-hook
'(lambda()
(c-set-style "stroustrup")
(setq tab-width 4)
(setq c-basic-offset 4)
(setq indent-tabs-mode nil)
(defun ywb-php-lineup-arglist-intro (langelem)
(save-excursion
(goto-char (cdr langelem))
(vector (+ (current-column) c-basic-offset))))
(defun ywb-php-lineup-arglist-close (langelem)
(save-excursion
(goto-char (cdr langelem))
(vector (current-column))))
(c-set-offset 'arglist-intro 'ywb-php-lineup-arglist-intro)
(c-set-offset 'arglist-close 'ywb-php-lineup-arglist-close)
(c-set-offset 'arglist-cont-nonempty' 4)
(c-set-offset 'case-label' 4)
(show-paren-mode t)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment