Created
October 19, 2010 15:38
-
-
Save jwalsh/634398 to your computer and use it in GitHub Desktop.
.emacs
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
(setq load-path (cons (expand-file-name "~/lisp") load-path)) | |
(autoload 'js2-mode "js2" nil t) | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
(setq load-path (cons (expand-file-name "~/sandbox/nodelint.js/examples/emacs") load-path)) | |
(require 'flymake-nodelint) | |
(add-hook 'javascript-mode-hook | |
(lambda () (flymake-mode t))) | |
;; (add-to-list 'load-path | |
;; "~/.emacs.d/plugins") | |
(add-to-list 'load-path | |
"~/.emacs.d/plugins/yasnippet-0.6.1c") | |
(require 'yasnippet) ;; not yasnippet-bundle | |
(yas/initialize) | |
(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets") | |
(yas/load-directory "~/sandbox/js-yasnippets") | |
;; http://blog.tuxicity.se/emacs/javascript/js2-mode/yasnippet/2009/06/14/js2-mode-and-yasnippet.html | |
(eval-after-load 'js2-mode | |
'(progn | |
(define-key js2-mode-map (kbd "TAB") (lambda() | |
(interactive) | |
(let ((yas/fallback-behavior 'return-nil)) | |
(unless (yas/expand) | |
(indent-for-tab-command) | |
(if (looking-back "^\s*") | |
(back-to-indentation)))))))) | |
(define-derived-mode dojo-js-mode js2-mode "dojo") | |
(global-set-key "\C-x\C-m" 'execute-extended-command) | |
(global-set-key "\C-c\C-m" 'execute-extended-command) | |
(setq load-path (cons (expand-file-name "~/sandbox/stgit/contrib") load-path)) | |
(require 'stgit) | |
(add-to-list 'load-path "~/sandbox/mustache/contrib") | |
(require 'mustache-mode) | |
(setq auto-mode-alist (cons '("\\.tpl$" . tpl-mode) auto-mode-alist)) | |
(autoload 'tpl-mode "tpl-mode" "Major mode for editing CTemplate files." t) | |
(add-hook 'tpl-mode-hook '(lambda () (font-lock-mode 1))) | |
(add-to-list 'load-path "~/sandbox/haml/extra") | |
(require 'haml-mode) | |
(require 'sass-mode) | |
(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. | |
'(js2-basic-offset 2)) | |
(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 (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 75 :width normal :foundry "misc" :family "fixed"))))) | |
(put 'downcase-region 'disabled nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment