Skip to content

Instantly share code, notes, and snippets.

@danlamanna
Last active December 10, 2015 15:08
Show Gist options
  • Save danlamanna/4452793 to your computer and use it in GitHub Desktop.
Save danlamanna/4452793 to your computer and use it in GitHub Desktop.
;; required or gtfo
(add-hook 'php-mode-hook (lambda()
(setq indent-tabs-mode nil)
(setq tab-width 2)
(setq c-basic-offset 2)))
(add-hook 'before-save-hook 'whitespace-cleanup)
(require 'align)
(add-to-list 'align-rules-list
`(php-array-keys
(regexp . "\\(\\s-*\\)=")
(justify . nil)
(repeat . nil)
(modes . '(php-mode))
(tab-stop)))
;; niceties
(require 'flymake)
(add-hook 'php-mode-hook 'flymake-mode-on)
(add-hook 'php-mode-hook 'electric-pair-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment