-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs
127 lines (94 loc) · 3.36 KB
/
.emacs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
;;;Use Marmalade and MELPA
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
;;; Set load path to include .emacs.d/lisp
(let ((default-directory "~/.emacs.d/lisp/"))
(normal-top-level-add-to-load-path '("."))
(normal-top-level-add-subdirs-to-load-path))
;; Inherit Path
(exec-path-from-shell-initialize)
;;;Use Monokai
(load-theme 'monokai t)
;;;Macports commands for ehsell
(setenv "PATH" (concat "/opt/local/bin:/opt/local/sbin:" (getenv "PATH")))
;;;Homebrew commands for ehsell
(setenv "PATH" (concat "/usr/local/bin:/usr/local/sbin:" (getenv "PATH")))
;;;AucTex Stuff
;; Adds stuff to my PATH (LaTeX, etc)
(setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
;; Set the default LaTeX exec to pdfTeX
(setq TeX-PDF-mode t)
;;latexmk
(require 'auctex-latexmk)
(auctex-latexmk-setup)
;; Set default LaTeX command to LatexMk
(add-hook 'LaTeX-mode-hook '(lambda () (setq TeX-command-default "LatexMk")))
;;Environment Settings
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
;; Sets the default PDF viewer to, well, the default PDF viewer.
(setq TeX-view-program-list '(("Shell Default" "open %o")))
(setq TeX-view-program-selection '((output-pdf "Shell Default")))
;;; Sets emacs to recongize .mhtml and .mas as mason
(require 'mmm-auto)
(setq mmm-global-mode 'maybe)
(add-to-list 'auto-mode-alist '("\\.mas\\'" . html-mode))
(mmm-add-mode-ext-class 'html-mode "\\.mas\\'" 'mason)
(add-to-list 'auto-mode-alist '("\\.mhtml\\'" . html-mode))
(mmm-add-mode-ext-class 'html-mode "\\.mhtml\\'" 'mason)
;;; js2
(require 'js2-mode)
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
;;; aspell
(setq ispell-program-name "/usr/local/bin/aspell")
;;; maybe colors
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
;; Mutt support.
(setq auto-mode-alist (append '(("Users/temp/.mutt/temp/" . message-mode)) auto-mode-alist))
(add-hook 'message-mode-hook 'visual-line-mode)
(add-hook 'message-mode-hook 'flyspell-mode)
;; Org mode composition help
(add-hook 'org-mode-hook 'visual-line-mode)
(add-hook 'org-mode-hook 'flyspell-mode)
;;; ChucK?
(require 'chuck-mode)
;;; Racket stuff for parens
(add-hook 'racket-mode-hook 'paredit-mode)
(add-hook 'racket-mode-hook 'rainbow-delimiters-mode)
;;; octave editing
;;; fonts
; (add-to-list 'default-frame-alist '(font . "Monoid"))
;;; elpy
(elpy-enable)
;; use ag instead of grep for elpy search
(defun ag-search-at-point ()
"search project for symbol at point"
(interactive)
(ag-project (thing-at-point 'symbol)))
(define-key elpy-mode-map (kbd "C-c C-s") 'ag-search-at-point)
;;; autosave
(require 'real-auto-save)
(add-hook 'prog-mode-hook 'real-auto-save-mode)
;;; use bash
(setq shell-file-name "/bin/bash")
;;; python imports
(add-hook 'python-mode-hook 'importmagic-mode)
(with-eval-after-load 'importmagic
(define-key importmagic-mode-map (kbd "C-c C-a") 'importmagic-fix-symbol-at-point))
;;; indentation stuff
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq c-basic-indent 4)
(setq js-indent-level 2)
;; ag mode
(setq ag-reuse-buffers 't)
;; midnight
(require 'midnight)
(midnight-delay-set 'midnight-delay "9:00pm")
;; dired settings
(put 'dired-find-alternate-file 'disabled nil)