author | Luke Hoersten <Luke@Hoersten.org> |
Mon, 24 Jun 2013 21:49:23 -0500 | |
changeset 56 | 7446c9ffe828 |
parent 55 | d4adcd3d5ef9 |
child 57 | e35be98bd58c |
permissions | -rw-r--r-- |
21 | 1 |
;; ~/.emacs.d/init.el (~/.emacs) |
4
0fda818a8b6a
Added doxymacs and provides for requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
3
diff
changeset
|
2 |
;; Luke Hoersten <[email protected]> |
0 | 3 |
|
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
4 |
;;;; General ;;;; |
44
6e66ab8d9185
Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents:
43
diff
changeset
|
5 |
(add-to-list 'load-path "~/.emacs.d") ; set default emacs load path |
0 | 6 |
|
21 | 7 |
(setq-default |
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
8 |
ediff-split-window-function |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
9 |
'split-window-horizontally ; diff horizontally |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
10 |
x-select-enable-clipboard t ; paste from X buffer |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
11 |
inhibit-splash-screen t ; disable splash screen |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
12 |
truncate-lines t ; truncate, not wrap, lines |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
13 |
indent-tabs-mode nil ; only uses spaces for indentation |
35
4a9c440b6764
Moved 3rd party libs to separate dir and added optional scion haskell support.
Luke Hoersten <Luke@Hoersten.org>
parents:
34
diff
changeset
|
14 |
split-width-threshold 181 ; min width to split window horizontially |
40
886afd628fa2
Split off programming language-specific custimizations to separate init files.
Luke Hoersten <Luke@Hoersten.org>
parents:
39
diff
changeset
|
15 |
split-height-threshold 120 ; min width to split window vertically |
43
cfdd7b253085
Added newline support and 4-width tabs in python.
Luke Hoersten <Luke@Hoersten.org>
parents:
42
diff
changeset
|
16 |
reb-re-syntax 'string ; use string syntax for regexp builder |
cfdd7b253085
Added newline support and 4-width tabs in python.
Luke Hoersten <Luke@Hoersten.org>
parents:
42
diff
changeset
|
17 |
require-final-newline 'visit-save) ; add a newline automatically |
0 | 18 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
19 |
(put 'set-goal-column 'disabled nil) ; enable goal column setting |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
20 |
(put 'narrow-to-region 'disabled nil) ; enable hiding |
21 | 21 |
(put 'narrow-to-page 'disabled nil) |
22 |
||
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
23 |
(column-number-mode t) ; show column numbers |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
24 |
(delete-selection-mode t) ; replace highlighted text |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
25 |
(windmove-default-keybindings) ; move between windows with shift-arrow |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
26 |
(fset 'yes-or-no-p 'y-or-n-p) ; replace yes/no prompts |
44
6e66ab8d9185
Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents:
43
diff
changeset
|
27 |
(global-hl-line-mode t) ; highlight current line |
6e66ab8d9185
Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents:
43
diff
changeset
|
28 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
29 |
|
45
12715da9a300
Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents:
44
diff
changeset
|
30 |
;;; Coding |
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
31 |
(which-func-mode t) ; show current function |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
32 |
(show-paren-mode t) ; show matching paren |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
33 |
(transient-mark-mode t) ; show highlighting |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
34 |
(global-font-lock-mode t) ; syntax highlighting |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
35 |
(global-set-key (kbd "C-c c") 'compile) ; compile |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
36 |
(global-set-key (kbd "C-c r") 'recompile) ; recompile |
54 | 37 |
(subword-mode t) ; move by camelCase words |
45
12715da9a300
Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents:
44
diff
changeset
|
38 |
|
0 | 39 |
|
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
40 |
;;; Darwin |
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
41 |
(if (string-match "darwin" (emacs-version)) |
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
42 |
(progn |
55
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
43 |
(setq-default |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
44 |
mac-command-modifier 'meta |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
45 |
ns-pop-up-frames nil |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
46 |
ispell-program-name "/usr/local/bin/aspell"))) |
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
47 |
|
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
48 |
;;; Xorg |
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
49 |
(if window-system |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
50 |
(progn |
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
51 |
(defun get-font () |
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
52 |
"Get appropriate font based on system and hostname." |
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
53 |
(cond |
46
2c6b198426df
Cleaned up color themes a little. Added thirdparty color theme elisp for os x.
Luke Hoersten <Luke@Hoersten.org>
parents:
45
diff
changeset
|
54 |
((string-match "darwin" (emacs-version)) "Ubuntu Mono-14") |
45
12715da9a300
Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents:
44
diff
changeset
|
55 |
((string-match "RichardParker" (system-name)) "Ubuntu Mono-8.5") |
12715da9a300
Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents:
44
diff
changeset
|
56 |
((string-match "HoldenCaulfield" (system-name)) "Ubuntu Mono-10.5") |
12715da9a300
Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents:
44
diff
changeset
|
57 |
((string-match "lhoersten-66113" (system-name)) "Ubuntu Mono-10.5") |
12715da9a300
Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents:
44
diff
changeset
|
58 |
("Ubuntu Mono-10.5"))) |
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
59 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
60 |
(tool-bar-mode -1) ; remove tool bar |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
61 |
(scroll-bar-mode -1) ; remove scroll bar |
47
3415a60d5fd0
Added solarized color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
46
diff
changeset
|
62 |
(menu-bar-mode -1) ; remove menu bar |
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
63 |
(visual-line-mode t) ; word wrap break on whitespace |
47
3415a60d5fd0
Added solarized color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
46
diff
changeset
|
64 |
(set-frame-font (get-font)))) |
0 | 65 |
|
53 | 66 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
67 |
;;; terminal |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
68 |
(global-set-key (kbd "C-c s") 'eshell) ; start shell |
53 | 69 |
(defun setup-env () |
70 |
(setenv "TERM" "emacs") ; enable colors |
|
71 |
(setenv "ODBCSYSINI" "/home/lhoersten/myodbc") |
|
72 |
(setenv "ODBCINI" "/home/lhoersten/myodbc/odbc.ini") |
|
54 | 73 |
(setenv "PATH" (concat "/usr/local/bin:" (getenv "HOME") "/.cabal/bin:" (getenv "PATH")))) |
53 | 74 |
(add-hook 'eshell-mode-hook 'setup-env) |
75 |
(setup-env) |
|
76 |
(eshell) |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
77 |
|
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
78 |
;;;; Mode-Specific ;;;; |
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
79 |
|
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
80 |
;;; text-mode |
55
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
81 |
(add-hook 'fundamental-mode-hook 'flyspell-mode t) ; spellcheck text |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
82 |
(add-hook 'fundamental-mode-hook 'turn-on-auto-fill) ; autofill text |
28
8f4bd2f2cc06
Aquamacs comes with more features so I removed some mac stuff.
Luke Hoersten <Luke@Hoersten.org>
parents:
26
diff
changeset
|
83 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
84 |
;;; ido-mode |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
85 |
(ido-mode t) ; file/buffer selector |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
86 |
(setq-default |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
87 |
ido-enable-flex-matching t ; fuzzy matching for ido mode |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
88 |
ido-create-new-buffer 'always ; create new buffer without prompt |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
89 |
ido-everywhere t) ; use ido where possible |
21 | 90 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
91 |
;;; whitespace-mode |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
92 |
(global-whitespace-mode t) ; show whitespace |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
93 |
(add-hook 'before-save-hook 'whitespace-cleanup) ; cleanup whitespace on exit |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
94 |
(setq-default |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
95 |
whitespace-line-column 120 ; column width |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
96 |
whitespace-style ; whitespace to highlight |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
97 |
'(trailing lines-tail empty indentation |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
98 |
space-before-tab space-after-tab)) |
21 | 99 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
100 |
;;; python-mode |
43
cfdd7b253085
Added newline support and 4-width tabs in python.
Luke Hoersten <Luke@Hoersten.org>
parents:
42
diff
changeset
|
101 |
(add-hook 'python-mode-hook (lambda () (setq tab-width 4))) |
21 | 102 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
103 |
;;; org-mode |
21 | 104 |
(add-hook |
105 |
'org-mode-hook |
|
106 |
(lambda () |
|
107 |
(local-set-key (kbd "M-p") 'org-move-item-up) |
|
108 |
(local-set-key (kbd "M-S-p") 'org-move-subtree-up) |
|
109 |
(local-set-key (kbd "M-n") 'org-move-item-down) |
|
110 |
(local-set-key (kbd "M-S-n") 'org-move-subtree-down))) |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
111 |
|
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
112 |
;;; ibuffer |
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
113 |
(global-set-key (kbd "C-x C-b") 'ibuffer) ; better buffer browser |
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
114 |
(setq-default |
33
3be3d7b4cae4
Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents:
32
diff
changeset
|
115 |
ibuffer-show-empty-filter-groups nil |
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
116 |
ibuffer-saved-filter-groups |
33
3be3d7b4cae4
Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents:
32
diff
changeset
|
117 |
'(("default" |
3be3d7b4cae4
Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents:
32
diff
changeset
|
118 |
("Emacs Lisp" (mode . emacs-lisp-mode)) |
3be3d7b4cae4
Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents:
32
diff
changeset
|
119 |
("Haskell" (mode . haskell-mode)) |
3be3d7b4cae4
Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents:
32
diff
changeset
|
120 |
("Python" (mode . python-mode)) |
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
121 |
("Jython" (mode . jython-mode)) |
52
b54c3f2e12f6
Added clojure mode to ibuffer.
Luke Hoersten <Luke@Hoersten.org>
parents:
50
diff
changeset
|
122 |
("Clojure" (mode . clojure-mode)) |
53 | 123 |
("Markup" (mode . sgml-mode)) |
124 |
("HTML" (mode . html-mode)) |
|
125 |
("CSS" (mode . css-mode)) |
|
33
3be3d7b4cae4
Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents:
32
diff
changeset
|
126 |
("C++" (mode . c++-mode))))) |
3be3d7b4cae4
Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents:
32
diff
changeset
|
127 |
(add-hook |
3be3d7b4cae4
Removed auto-complete mode and cleaned up ibuffer groups.
Luke Hoersten <Luke@Hoersten.org>
parents:
32
diff
changeset
|
128 |
'ibuffer-mode-hook |
36
d915699fbc26
Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents:
35
diff
changeset
|
129 |
(lambda () |
d915699fbc26
Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents:
35
diff
changeset
|
130 |
(ido-mode t) |
d915699fbc26
Removed extranious lambda quotes.
Luke Hoersten <Luke@Hoersten.org>
parents:
35
diff
changeset
|
131 |
(ibuffer-switch-to-saved-filter-groups "default"))) |
32
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
132 |
|
68b57950fa11
Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents:
31
diff
changeset
|
133 |
|
55
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
134 |
;;;; Requires and Packages ;;;; |
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
135 |
|
55
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
136 |
;;; custom inits |
40
886afd628fa2
Split off programming language-specific custimizations to separate init files.
Luke Hoersten <Luke@Hoersten.org>
parents:
39
diff
changeset
|
137 |
(require 'c-init) ; c specific elisp |
37
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
138 |
(require 'align-with-spaces) ; use only spaces for alignment |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
139 |
(require 'pastebin-region) ; send selected text to pastebin |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
140 |
(require 'move-line) ; move line up or down |
55
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
141 |
(require 'uniquify) ; unique buffer names with dirs |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
142 |
|
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
143 |
;;; uniquify |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
144 |
(setq |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
145 |
uniquify-buffer-name-style 'post-forward |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
146 |
uniquify-separator ":") |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
147 |
|
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
148 |
;;; packages |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
149 |
(package-initialize) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
150 |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
151 |
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
152 |
|
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
153 |
;; install |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
154 |
(let ((ensure-installed |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
155 |
(lambda (name) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
156 |
(unless (package-installed-p name) (package-install name)))) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
157 |
(packages |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
158 |
'(flymake-haskell-multi ghc ghci-completion haskell-mode js2-mode |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
159 |
rainbow-delimiters rainbow-mode scion solarized-theme |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
160 |
yasnippet zencoding-mode))) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
161 |
(mapc ensure-installed packages)) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
162 |
|
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
163 |
;;; color-theme |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
164 |
(setq-default |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
165 |
custom-safe-themes |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
166 |
'("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
167 |
"d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" default)) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
168 |
(load-theme 'solarized-light) |
42 | 169 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
170 |
;;; yasnippets |
54 | 171 |
(setq-default yas-prompt-functions '(yas-ido-prompt yas-dropdown-prompt)) ; use ido for multiple snippets |
56 | 172 |
(setq-default yas-snippet-dirs '("~/.emacs.d/snippets")) |
54 | 173 |
(yas-global-mode t) |
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
174 |
|
44
6e66ab8d9185
Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents:
43
diff
changeset
|
175 |
;;; java-mode |
6e66ab8d9185
Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents:
43
diff
changeset
|
176 |
(add-hook 'java-mode-hook (lambda () (setq whitespace-line-column 140))) |
6e66ab8d9185
Split out some init files.
Luke Hoersten <Luke@Hoersten.org>
parents:
43
diff
changeset
|
177 |
|
55
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
178 |
;;; js2-mode |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
179 |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
180 |
(add-hook 'js-mode-hook 'js2-minor-mode) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
181 |
|
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
182 |
;;; zencoding-mode - html |
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
183 |
(add-hook 'sgml-mode-hook 'zencoding-mode) ; Auto-start on any markup modes |
53 | 184 |
(add-to-list 'auto-mode-alist '("\\.tpl\\'" . html-mode)) |
31
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents:
30
diff
changeset
|
185 |
|
37
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
186 |
;;; coding-modes map |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
187 |
(mapc |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
188 |
(lambda (x) |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
189 |
(add-hook x 'linum-mode) |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
190 |
(add-hook x 'rainbow-delimiters-mode)) |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
191 |
'(text-mode-hook |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
192 |
c-mode-common-hook |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
193 |
python-mode-hook |
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
194 |
haskell-mode-hook |
50 | 195 |
clojure-mode-hook |
37
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents:
36
diff
changeset
|
196 |
emacs-lisp-mode-hook)) |
55
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
197 |
|
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
198 |
;;; haskell-mode |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
199 |
(add-hook |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
200 |
'haskell-mode-hook |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
201 |
(lambda () |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
202 |
;; (ghc-init) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
203 |
(turn-on-haskell-indent) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
204 |
(capitalized-words-mode) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
205 |
(turn-on-haskell-doc-mode) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
206 |
(turn-on-haskell-decl-scan) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
207 |
(imenu-add-menubar-index) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
208 |
(setq |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
209 |
haskell-font-lock-haddock t |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
210 |
haskell-stylish-on-save t |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
211 |
;; haskell-tags-on-save t |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
212 |
haskell-program-name "ghci" |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
213 |
haskell-indent-offset 4 |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
214 |
whitespace-line-column 78) |
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents:
54
diff
changeset
|
215 |
)) |