-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs
279 lines (197 loc) · 8.05 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(browse-url-mozilla-program "firefox")
'(c-offsets-alist (quote ((statement-cont . c-lineup-assignments))))
'(case-fold-search t)
'(confirm-kill-emacs (quote y-or-n-p))
'(current-language-environment "Latin-1")
'(custom-enabled-themes (quote (grandshell)))
'(custom-safe-themes (quote ("7ed6913f96c43796aa524e9ae506b0a3a50bfca061eed73b66766d14adfa86d1" default)))
'(default-input-method "latin-1-prefix")
'(doxymacs-doxygen-dirs (quote (("^/home/wecuser/work/src" "/home/wecuser/work/docs/tagfile.xml" "file:///home/wecuser/work/docs/html"))))
'(doxymacs-doxygen-style "C++")
'(dvc-tips-enabled nil)
'(explicit-bash-args (quote ("--noediting" "--login" "-i")))
'(global-auto-composition-mode nil)
'(global-auto-revert-mode t nil (autorevert))
'(global-font-lock-mode t nil (font-lock))
'(indent-tabs-mode nil)
'(inhibit-startup-screen t)
'(iswitchb-case t)
'(iswitchb-mode t nil (iswitchb))
'(js-indent-level 2)
'(org-agenda-files (quote ("~/org/HWDDC.org")) t)
'(show-paren-mode t nil (paren))
'(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
'(tool-bar-mode nil nil (tool-bar))
'(transient-mark-mode nil)
'(user-full-name "Jim Hunziker")
'(user-mail-address "[email protected]")
'(visible-bell t)
'(w3m-use-cookies t))
;
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'load-path "~/elisp")
(add-to-list 'load-path "~/share/emacs/site-lisp")
(defun my-c-mode-common-hook ()
(c-toggle-hungry-state 1)
(c-set-offset 'substatement-open 0)
(auto-fill-mode))
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
(global-set-key (read-kbd-macro "<C-;>") nil)
(defconst my-key-prefix
(kbd "C-;")
"My prefix map keys")
(defvar my-map (lookup-key global-map my-key-prefix))
(unless (keymapp my-map) ;not yet defined
(setq my-map (make-sparse-keymap)))
(define-key global-map my-key-prefix my-map)
(define-key my-map (kbd "r") 'revert-buffer)
(define-key my-map (kbd "g") 'goto-line)
(define-key my-map (kbd "c") 'compile)
(define-key my-map (kbd "b") 'bury-buffer)
(fset 'yes-or-no-p 'y-or-n-p)
(defun yes-or-no-p (PROMPT)
(beep)
(y-or-n-p PROMPT))
(put 'upcase-region 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(setq auto-mode-alist (cons '("\\.jsp\\'" . html-mode) auto-mode-alist))
;;(load "nxml-mode/rng-auto.el")
(setq auto-mode-alist
(cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode)
auto-mode-alist))
(autoload 'matlab-mode "matlab" "Enter MATLAB mode." t)
(setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
(autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t)
(server-start)
;(normal-erase-is-backspace-mode 1)
(prefer-coding-system 'utf-8)
;(require 'psvn)
(require 'doxymacs)
(add-hook 'c-mode-common-hook'doxymacs-mode)
(defun my-doxymacs-font-lock-hook ()
(if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode))
(doxymacs-font-lock)))
(add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook)
(add-to-list 'load-path "~/elisp/jxminor")
(autoload 'jxminor-mode-on "jx-mode" "" t)
(add-hook 'java-mode-hook 'jxminor-mode-on)
(add-hook
'java-mode-hook
'(lambda () "Treat Java 1.5 @-style annotations as comments."
(setq c-comment-start-regexp "\\(@\\|/\\(/\\|[*][*]?\\)\\)")
(modify-syntax-entry ?@ "< b" java-mode-syntax-table)))
;; (require 'mmm-mode)
;; (setq mmm-global-mode 'maybe)
;; (mmm-add-group 'jsp
;; `((jsp-code
;; :submode java-mode
;; :match-face (("<%!" . mmm-declaration-submode-face)
;; ("<%=" . mmm-output-submode-face)
;; ("<%" . mmm-code-submode-face))
;; :front "<%[!=]?"
;; :back "%>"
;; :insert ((?% jsp-code nil <at> "<%" <at> " " _ " " <at> "%>" <at> )
;; (?! jsp-declaration nil <at> "<%!" <at> " " _ " " <at> "%>" <at> )
;; (?= jsp-expression nil <at> "<%=" <at> " " _ " " <at> "%>" <at> ))
;; )
;; (jsp-directive
;; :submode text-mode
;; :face mmm-special-submode-face
;; :front "<% <at> "
;; :back "%>"
;; :insert ((? <at> jsp-directive nil <at> "<% <at> " <at> " " _ " " <at> "%>" <at> ))
;; )))
;; (setq mmm-mode-ext-classes-alist nil)
;; (add-to-list 'mmm-mode-ext-classes-alist '(nil "\\.asp\\'" asp-code))
;; (add-to-list 'mmm-mode-ext-classes-alist '(nil "\\.jsp\\'" jsp-code))
;; (add-to-list 'mmm-mode-ext-classes-alist '(nil "\\.js\\'" html-js))
;(require 'mmm-auto)
; (setq mmm-global-mode 'maybe)
;(mmm-add-mode-ext-class nil "\\.jsp?\\'" 'jsp)
;(mmm-add-classes
; '((jsp
; :submode java-mode
; :front "<%"
; :back "%>")))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(autoload 'longlines-mode
"longlines.el"
"Minor mode for automatically wrapping long lines." t)
(setq outline-minor-mode-prefix (kbd "C-c C-k"))
(setq number-outline-regexp "\\([0-9]+\\.\\)+")
(defun number-outline-level ()
(save-excursion
(looking-at outline-regexp)
(let ((match (match-string 0))
(counter 0))
(dotimes (i (length match))
(when (char-equal ?. (aref match i))
(setq counter (1+ counter))))
counter)))
(defun number-outline-minor-mode ()
(interactive)
(outline-minor-mode)
(setq outline-regexp number-outline-regexp)
(fset outline-level (symbol-function 'number-outline-level)))
(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt)
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(setq ansi-color-names-vector
["black" "red4" "green4" "yellow4"
"blue3" "magenta" "cyan4" "white"])
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(add-hook 'shell-mode-hook '(lambda () (toggle-truncate-lines 1)))
(setq comint-prompt-read-only t)
(add-to-list 'auto-mode-alist '("SConstruct" . python-mode))
(add-to-list 'auto-mode-alist '("SConscript" . python-mode))
(add-to-list 'auto-mode-alist '("\\.wsgi$" . python-mode))
(load "~/elisp/haskell-mode-2.4/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings))
;(load-file "/usr/local/share/emacs/site-lisp/dvc/dvc-load.el")
(autoload 'd-mode "~/elisp/d-mode/d-mode" "Major mode for editing D code." t)
(add-to-list 'auto-mode-alist '("\\.d[i]?\\'" . d-mode))
;; org-mode settings
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(setq org-agenda-files (list "~/org/HWDDC.org"))
(autoload 'lout-mode "lout-mode" "Major mode for editing Lout text" t)
(setq auto-mode-alist
(append '(("\\.lout\\'" . lout-mode)) auto-mode-alist))
(autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
(setq auto-mode-alist
(append '(("\\.cs$" . csharp-mode)) auto-mode-alist))
(defun my-csharp-mode-fn ()
"function that runs when csharp-mode is initialized for a buffer."
...insert your code here...
...most commonly, your custom key bindings ...
)
(add-hook 'csharp-mode-hook 'my-csharp-mode-fn t)
(add-to-list 'auto-mode-alist '("\\.pde$" . c++-mode))
(add-to-list 'auto-mode-alist '("\\.proto$" . c++-mode))
;;(require 'ipython)
(put 'downcase-region 'disabled nil)
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
(add-to-list 'load-path "~/elisp/rust-mode")
(require 'rust-mode)
(add-to-list 'auto-mode-alist '("\\.rs$" . rust-mode))
(add-to-list 'load-path "~/.emacs.d/elpa/grandshell-theme-20140415.2225")
(require 'grandshell-theme)
(load-theme 'grandshell t)