Created
June 14, 2012 09:45
-
-
Save flyingmachine/2929345 to your computer and use it in GitHub Desktop.
my .emacs file
This file contains hidden or 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
;; env PATH | |
(when (equal system-type 'darwin) | |
(setenv "PATH" (concat "/opt/local/bin:/usr/local/bin:" (getenv "PATH"))) | |
(push "/opt/local/bin" exec-path) | |
(push "/usr/local/bin" exec-path)) | |
;; text | |
(set-face-attribute 'default nil :height 140) | |
(load-theme 'deeper-blue) | |
(remove-hook 'text-mode-hook 'turn-on-flyspell) | |
(load-library "~/.emacs.d/machine") | |
(add-to-list 'load-path "~/.emacs.d/vendor") | |
;;(autoload 'asciidoc-mode "asciidoc-mode" nil t) | |
;;(add-to-list 'auto-mode-alist '("\\.asciidoc$" . asciidoc-mode)) | |
(autoload 'doc-mode "doc-mode") | |
(add-to-list 'auto-mode-alist '("\\.asciidoc$" . doc-mode)) | |
;; rubyish | |
(remove-hook 'ruby-mode-hook 'esk-paredit-nonlisp) | |
(add-to-list 'auto-mode-alist '("\\.thor$" . ruby-mode)) | |
(require 'haml-mode) | |
(autoload 'scss-mode "scss-mode") | |
(add-to-list 'auto-mode-alist '("\\.scss$" . scss-mode)) | |
(setq scss-compile-at-save nil) | |
(setq css-indent-offset 2) | |
(setq ruby-deep-indent-paren nil) | |
(require 'yaml-mode) | |
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode)) | |
;; cucumber | |
(add-to-list 'load-path "~/.emacs.d/vendor/feature-mode") | |
(require 'feature-mode) | |
(add-to-list 'auto-mode-alist '("\.feature$" . feature-mode)) | |
;; coffee script | |
(add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode") | |
(require 'coffee-mode) | |
(defun coffee-custom () | |
"coffee-mode-hook" | |
(set (make-local-variable 'tab-width) 2)) | |
(add-hook 'coffee-mode-hook | |
'(lambda() (coffee-custom))) | |
(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. | |
'(coffee-tab-width 2)) | |
(define-key coffee-mode-map "\C-j" 'coffee-newline-and-indent) | |
(setq coffee-cleanup-whitespace nil) | |
;; javascript | |
(autoload 'js2-mode "js2" nil t) | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
(setq js-indent-level 2) | |
;; shell scripts | |
(setq-default sh-basic-offset 2) | |
(setq-default sh-indentation 2) | |
;; themes | |
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes") | |
;; org mode | |
(setq load-path (cons "~/.emacs.d/vendor/org-7.8.03/lisp" load-path)) | |
;; The following lines are always needed. Choose your own keys. | |
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) | |
(add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on | |
(global-set-key "\C-cl" 'org-store-link) | |
(global-set-key "\C-ca" 'org-agenda) | |
(global-set-key "\C-cb" 'org-iswitchb) | |
;; slime | |
(defun slime () | |
(interactive) | |
(fmakunbound 'slime) | |
(load (expand-file-name "~/quicklisp/slime-helper.el")) | |
(set-language-environment "UTF-8") | |
(setq slime-lisp-implementations | |
'((sbcl ("/usr/local/bin/sbcl") :coding-system utf-8-unix))) | |
(setq slime-net-coding-system 'utf-8-unix) | |
(setq inferior-lisp-program 'sbcl) | |
(slime)) | |
;; clojure | |
(add-hook 'clojure-mode-hook | |
(lambda () | |
(setq inferior-lisp-program "lein repl"))) | |
(add-hook 'slime-repl-mode-hook | |
(defun clojure-mode-slime-font-lock () | |
(require 'clojure-mode) | |
(let (font-lock-mode) | |
(clojure-mode-font-lock-setup)))) | |
;; textile, markdown | |
(require 'textile-mode) | |
(add-to-list 'auto-mode-alist '("\\.textile\\'" . textile-mode)) | |
(autoload 'markdown-mode "markdown-mode.el" | |
"Major mode for editing Markdown files" t) | |
(setq auto-mode-alist | |
(cons '("\\.markdown" . markdown-mode) auto-mode-alist)) | |
;; ispell | |
;; (setq ispell-program-name "/usr/local/bin/ispell") | |
;; stats | |
; (load "ess-site/lisp/ess-site") | |
;; hippie expand | |
(setq hippie-expand-try-functions-list (delete 'try-complete-file-name hippie-expand-try-functions-list)) | |
(setq hippie-expand-try-functions-list (delete 'try-complete-file-name-partially hippie-expand-try-functions-list)) | |
;; jade | |
(add-to-list 'load-path "~/.emacs.d/vendor/jade-mode") | |
(require 'sws-mode) | |
(require 'jade-mode) | |
(add-to-list 'auto-mode-alist '("\\.styl$" . sws-mode)) | |
(add-to-list 'auto-mode-alist '("\\.jade$" . jade-mode)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment