Created
August 27, 2012 14:47
-
-
Save tmiller/3489150 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
;; Packages | |
(require 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/")) | |
(package-initialize) | |
;; General | |
(fset 'yes-or-no-p 'y-or-n-p) | |
(setq inhibit-startup-screen t) | |
(setq inhibit-startup-echo-area-message t) | |
(setq kill-buffer-query-functions | |
(remq 'process-kill-buffer-query-function | |
kill-buffer-query-functions)) | |
(tool-bar-mode -1) | |
;; Turn off bell | |
(setq ring-bell-function 'ignore) | |
;; Show parens | |
(show-paren-mode t) | |
(setq show-paren-delay 0) | |
(setq show-paren-style 'parenthesis) | |
;; Backup directory | |
(setq | |
backup-by-copying t ; don't clobber symlinks | |
backup-directory-alist | |
'(("." . "~/.backups.emacs")) ; don't litter my fs tree | |
delete-old-versions t | |
kept-new-versions 6 | |
kept-old-versions 2 | |
version-control t) ; use versioned backups | |
;; Color theme | |
(load-theme 'solarized-light t) | |
;; Unicode | |
(prefer-coding-system 'utf-8) | |
(set-default-coding-systems 'utf-8) | |
(set-terminal-coding-system 'utf-8) | |
(set-keyboard-coding-system 'utf-8) | |
(add-hook 'term-exec-hook | |
(function | |
(lambda () | |
(set-buffer-process-coding-system 'utf-8-unix 'utf-8-unix)))) | |
;; Mac config | |
(when (eq system-type 'darwin) | |
(setq mac-command-modifier 'meta) | |
(setq mac-right-command-modifier 'meta) | |
(setq mac-option-modifier 'alt) | |
(setq mac-right-option-modifier 'meta)) | |
;; IDO mode | |
(setq ido-enable-flex-matching t) | |
(setq ido-everywhere t) | |
(setq confirm-nonexistent-file-or-buffer nil) | |
(setq ido-create-new-buffer 'always) | |
(ido-mode t) | |
;; Paredit | |
(add-hook 'emacs-lisp-mode-hook 'paredit-mode) | |
(add-hook 'clojure-mode-hook 'paredit-mode) | |
;; YAML mode | |
(require 'yaml-mode) | |
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode)) | |
;; Haml mode | |
(add-hook 'haml-mode-hook | |
(lambda () | |
(setq indent-tabs-mode nil) | |
(define-key haml-mode-map "\C-m" 'newline-and-indent))) | |
;; rbenv | |
(setq rbenv-folder (concat (getenv "HOME") "/.rbenv")) | |
(when (file-readable-p rbenv-folder) | |
(defun rbenv-path (&optional subfolder) | |
(concat rbenv-folder | |
(when (stringp subfolder) | |
(concat "/" subfolder)))) | |
(setenv "PATH" | |
(concat (rbenv-path "shims") ":" | |
(rbenv-path "bin") ":" | |
(getenv "PATH"))) | |
(setq exec-path | |
(cons (rbenv-path "shims") | |
(cons (rbenv-path "bin") | |
exec-path)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment