Created
August 17, 2010 15:00
-
-
Save mcfunley/530267 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'php-mode) | |
(defun progmode-defaults () | |
(interactive) | |
(enable-tab-completion) | |
(column-number-mode t) | |
(linum-mode t) | |
(setq tab-width 4) | |
(setq c-basic-offset 4) | |
(column-marker-1 81) | |
(setq indent-tabs-mode nil) | |
(show-parens-in-buffer)) | |
(add-hook 'php-mode-hook 'progmode-defaults) | |
(add-to-list 'php-file-patterns "\\.phpt\\'") | |
(c-add-style | |
"my-php-style" | |
'((c-offsets-alist . ((arglist-close . c-lineup-close-paren))))) | |
(defun php-formatting-defaults () | |
; This crap fixes array indentation | |
(c-set-offset 'case-label '+) | |
(c-set-offset 'arglist-intro '+) | |
(c-set-offset 'arglist-cont-nonempty 'c-lineup-math) | |
(c-set-style "my-php-style")) | |
(add-hook 'php-mode-hook 'php-formatting-defaults) | |
(defun phpsh () | |
(interactive) | |
(kill-buffer (get-buffer-create "*phpsh*")) | |
(term (expand-file-name "~/bin/phpsh")) | |
(rename-buffer "*phpsh*")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment