Skip to content

Instantly share code, notes, and snippets.

@linqing
Created April 22, 2012 05:11
Show Gist options
  • Save linqing/2455467 to your computer and use it in GitHub Desktop.
Save linqing/2455467 to your computer and use it in GitHub Desktop.
my .emacs
;; Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/.
(custom-set-variables
'(auto-save-file-name-transforms '((".*" "~/.emacs.d/autosaves/\\1" t)))
'(backup-directory-alist '((".*" . "~/.emacs.d/backups/"))))
;; create the autosave dir if necessary, since emacs won't.
(make-directory "~/.emacs.d/autosaves/" t)
;;(setq load-path (cons "~/.emacs.d/emacs-rails" load-path))
;;(require 'rails)
(setq load-path (cons "~/.emacs.d/scala" load-path))
(require 'scala-mode-auto)
(auto-fill-mode 0)
;;;;¸ßÁÁµ±Ç°ÐÐ
(global-hl-line-mode t)
(put 'downcase-region 'disabled nil)
(setq-default fill-column 140)
;; Load the ensime lisp code...
(add-to-list 'load-path "~/.emacs.d/ensime_2.9.2-SNAPSHOT-0.8.0.RC3/elisp")
(require 'ensime)
;; This step causes the ensime-mode to be started whenever
;; scala-mode is started for a buffer. You may have to customize this step
;; if you're not using the standard scala mode.
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)
;; MINI HOWTO:
;; Open .scala file. M-x ensime (once per project)
;;(add-to-list 'load-path "~/.emacs.d/clojure")
;;(require 'package)
;;(add-to-list 'package-archives
;; '("marmalade" . "http://marmalade-repo.org/packages/"))
;;(package-initialize)
(add-to-list 'load-path "~/.emacs.d/slime/") ; your SLIME directory
(setq inferior-lisp-program "/opt/local/bin/sbcl") ; your Lisp system
(require 'slime-autoloads)
(slime-setup '(slime-repl))
;; (setq slime-lisp-implementations
;; '((sbcl ("sbcl" "--core" "/Users/linqing/.emacs.d/slime/sbcl.core-for-slime"))))
(setq slime-lisp-implementations
'((sbcl ("sbcl" "--core" "/Users/linqing/.emacs.d/slime/sbcl.core-with-swank")
:init (lambda (port-file _)
(format "(swank:start-server %S)\n" port-file)))))
(add-to-list 'load-path "~/.emacs.d/coffee-mode")
(require 'coffee-mode)
(add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode))
(add-to-list 'auto-mode-alist '("Cakefile" . coffee-mode))
(setq haskell-program-name "/usr/bin/ghci")
(add-hook 'nxml-mode-hook
'(lambda ()
(define-key nxml-mode-map "\C-c\C-c"
'nxml-complete)))
(require 'rainbow-delimiters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment