Skip to content

Instantly share code, notes, and snippets.

@jdutton
Last active February 16, 2016 16:52
Show Gist options
  • Save jdutton/6174443 to your computer and use it in GitHub Desktop.
Save jdutton/6174443 to your computer and use it in GitHub Desktop.
My emacs init.el file
(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))
;; Whatever packages you want
(defvar my-packages '(starter-kit
starter-kit-lisp
starter-kit-bindings
exec-path-from-shell
markdown-mode
rinari
go-mode
auto-complete
yaml-mode
scala-mode2
sbt-mode
)
"A list of packages to ensure are installed at launch.")
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
;; Make sure the PATH matches a login shell path
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
;; Disable ido-mode, which is kind of cool but gets in my way
(ido-mode 0)
(setq make-backup-files nil)
(setq indent-tabs-mode nil) ;; Always replace tabs with spaces
(setq-default tab-width 4)
(setq ruby-indent-level 2)
(setq ruby-deep-indent-paren nil)
(setq default-buffer-file-coding-system 'utf-8-unix)
;; Note: Must copy github.com/nsf/gocode/emacs/go-autocomplete.el into ~/.emacs.d
(add-to-list 'load-path "~/.emacs.d/lisp")
(require 'go-autocomplete)
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)
;; (setq auto-mode-alist (cons '("\\.md" . markdown-mode) auto-mode-alist))
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
(setq-default fill-column 100)
(put 'upcase-region 'disabled nil)
;; Mac OS-X has no 'ispell', but has brew-installed 'aspell'
(setq ispell-program-name "aspell")
(put 'downcase-region 'disabled nil)
(setq ring-bell-function 'ignore)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment