Created
July 8, 2013 23:40
-
-
Save andizzle/5953420 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 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . | |
"http://marmalade-repo.org/packages/") t) | |
(add-to-list 'package-archives | |
'("melpa" . | |
"http://melpa.milkbox.net/packages/") t) | |
(package-initialize) | |
(when (not package-archive-contents) | |
(package-refresh-contents)) | |
;; Add in your own as you wish: | |
(defvar my-packages '(starter-kit starter-kit-lisp starter-kit-ruby starter-kit-bindings ) | |
"A list of packages to ensure are installed at launch.") | |
(dolist (p my-packages) | |
(when (not (package-installed-p p)) | |
(package-install p))) | |
;;************************************************************ | |
;; configure HTML editing | |
;;************************************************************ | |
;; | |
(require 'php-mode) | |
(require 'blank-mode) | |
(require 'mmm-mode) | |
(setq mmm-global-mode 'maybe) | |
(setq js-indent-level 4) | |
;; | |
;; set up an mmm group for fancy html editing | |
;; | |
(mmm-add-group | |
'fancy-html | |
'( | |
(html-php-tagged | |
:submode php-mode | |
:face mmm-code-submode-face | |
:front "<[?]php" | |
:back "[?]>") | |
(html-css-attribute | |
:submode css-mode | |
:face mmm-declaration-submode-face | |
:front "styleREMOVEME=\"" | |
:back "\""))) | |
;; | |
;; What files to invoke the new html-mode for? | |
(add-to-list 'auto-mode-alist '("\\.inc\\'" . html-mode)) | |
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . html-mode)) | |
(add-to-list 'auto-mode-alist '("\\.php[34]?\\'" . html-mode)) | |
(add-to-list 'auto-mode-alist '("\\.[sj]?html?\\'" . html-mode)) | |
(add-to-list 'auto-mode-alist '("\\.jsp\\'" . html-mode)) | |
;; | |
;; What features should be turned on in this html-mode? | |
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil html-js)) | |
;;(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil embedded-css)) | |
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil fancy-html)) | |
;; | |
;; Not exactly related to editing HTML: enable editing help with | |
;; mouse-3 in all sgml files | |
(defun go-bind-markup-menu-to-mouse3 () | |
(define-key sgml-mode-map [(down-mouse-3)] 'sgml-tags-menu)) | |
;; | |
(set-face-background 'mmm-default-submode-face nil) | |
(add-hook 'sgml-mode-hook 'go-bind-markup-menu-to-mouse3) | |
;;(load-theme 'molokai t) | |
(color-theme-molokai) | |
(global-linum-mode t) | |
(setq linum-format "%3d | ") | |
(add-hook 'after-init-hook #'global-flycheck-mode) | |
(global-auto-revert-mode t) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(ansi-color-names-vector ["black" "#d55e00" "#009e73" "#f8ec59" "#0072b2" "#cc79a7" "#56b4e9" "white"]) | |
'(custom-safe-themes (quote ("68769179097d800e415631967544f8b2001dae07972939446e21438b1010748c" default))) | |
'(js-indent-level 4)) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(default ((t (:background "nil"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment