Created
October 20, 2009 06:04
-
-
Save mwilliams/214035 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
;; mwilliams.el | |
;; ------------ | |
;; My custom Emacs settings | |
;; Load my path | |
(setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin")) | |
(setq exec-path (append exec-path '("/usr/local/bin"))) | |
;; Load my shell (defined in ~/bin/eshell so zsh properly loads | |
;; and all the theming works correctly | |
(setenv "ESHELL" (expand-file-name "~/bin/eshell")) | |
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t) | |
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) | |
;; Save backups in one place | |
;; Put autosave files (ie #foo#) in one place, *not* | |
;; scattered all over the file system! | |
(defvar autosave-dir | |
(concat "/tmp/emacs_autosaves/" (user-login-name) "/") | |
(make-directory autosave-dir t) | |
(defun auto-save-file-name-p (filename) | |
(string-match "^#.*#$" (file-name-nondirectory filename))) | |
(defun make-auto-save-file-name () | |
(concat autosave-dir | |
(if buffer-file-name | |
(concat "#" (file-name-nondirectory buffer-file-name) "#") | |
(expand-file-name | |
(concat "#%" (buffer-name) "#"))))) | |
;; Put backup files (ie foo~) in one place too. (The backup-directory-alist | |
;; list contains regexp=>directory mappings; filenames matching a regexp are | |
;; backed up in the corresponding directory. Emacs will mkdir it if necessary.) | |
(defvar backup-dir (concat "/tmp/emacs_backups/" (user-login-name) "/")) | |
(setq backup-directory-alist (list (cons "." backup-dir))) | |
;; Set tabbing | |
(setq default-tab-width 2) | |
(setq tab-width 2) | |
;; Snippets via yasnippet | |
(add-to-list 'load-path "/vendor/yasnippet-0.6.1c/yasnippet.el") | |
(require 'yasnippet) | |
(yas/initialize) | |
(yas/load-directory "/vendor/yasnippet-0.6.1c/snippets") | |
;; Color themes | |
(add-to-list 'load-path "/vendor/color-theme-6.6.0/color-theme.el") | |
(add-to-list 'load-path "/vendor/twilight-emacs/color-theme-twilight.el") | |
(require 'color-theme) | |
(color-theme-twilight) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment