forked from blastura/dot-emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
178 lines (148 loc) · 5.69 KB
/
init.el
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
;; Anton Johansson
;; Time-stamp: "2010-09-18 17:07:46 anton"
;; Load paths
(add-to-list 'load-path (expand-file-name "~/.emacs.d"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp-personal"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/yasnippet"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/color-theme-6.6.0"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/org-mode/lisp"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/magit"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/rainbow"))
;; Auto install
(require 'auto-install)
(setq auto-install-directory (expand-file-name "~/.emacs.d/lisp/auto-install/"))
(add-to-list 'load-path auto-install-directory)
(require 'ring+)
(require 'doremi)
(require 'doremi-frm)
;;(auto-install-from-url "http://download.savannah.gnu.org/releases-noredirect/espresso/espresso.el")
(autoload 'espresso-mode "espresso" nil t)
;;(auto-install-from-url "http://autopair.googlecode.com/svn/tags/REL_0_3/autopair.el")
(require 'autopair)
(autopair-global-mode t)
;;(auto-install-from-url "http://jblevins.org/git/markdown-mode.git/plain/markdown-mode.el")
(autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t)
(setq auto-mode-alist (cons '("\\.text$\\|\\.markdown$" . markdown-mode) auto-mode-alist))
;;(auto-install-from-url "http://www.xsteve.at/prg/emacs/psvn.el")
(require 'psvn)
(require 'php-mode-improved)
;; (auto-install-from-url "http://github.com/nex3/haml/raw/master/extra/haml-mode.el")
;; (auto-install-from-url "http://github.com/nex3/haml/raw/master/extra/sass-mode.el")
(require 'sass-mode)
;; use groovy-mode when file ends in .groovy or has #!/bin/groovy at start
(autoload 'groovy-mode "groovy-mode" "Groovy editing mode." t)
(add-to-list 'auto-mode-alist '("\.groovy$" . groovy-mode))
(add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode))
;; ;; w3m
;; (add-to-list 'load-path (expand-file-name "/opt/local/share/emacs/site-lisp/w3m"))
;; (require 'w3m-load)
;; (require 'w3m-e21)
;; (provide 'w3m-e23)
;; JDE ;; CEDET needs to be loaded first
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/jde/lisp"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/cedet-1.0pre6/common"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/elib-1.0"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/ecb-2.40"))
(require 'aj-cedet)
(require 'ecb-autoloads)
(require 'jde)
(require 'aj-java)
;; Personal
(autoload 'less-mode "less-mode")
(add-to-list 'auto-mode-alist '("\\.less\\'" . less-mode))
;;(autoload 'scss-mode "scss-mode")
(require 'scss-mode)
;;(add-to-list 'auto-mode-alist '("\\.scss\\'" . scss-mode))
;; Modes
(require 'flymake)
(require 'magit)
(require 'rainbow-mode)
(require 'anything-config)
(require 'git)
;; (auto-install-from-url "http://github.com/juergenhoetzel/babel/raw/STABLE/babel.el")
(require 'babel) ;; Translate with eg Google
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$\\|\\.yaml$" . yaml-mode))
;; Personal customizations
(require 'aj-ibuffer)
(require 'aj-macros)
(require 'aj-generic)
(require 'aj-elisp)
(require 'aj-ediff)
(require 'aj-color)
(require 'aj-html)
(require 'aj-latex)
(require 'aj-irc)
(require 'aj-org)
(require 'aj-octave)
(require 'aj-mac)
(require 'aj-c)
(require 'aj-flymake)
(require 'aj-flymake-c)
(require 'aj-flymake-css)
(require 'flymake-scss)
(require 'aj-anything)
(require 'aj-compilation)
(require 'aj-ido)
(require 'aj-term)
(require 'aj-js)
;;(requireaj 'my-python)
;; (requiraje 'anything-match-plugin)
;; (set-variable 'anything-mp-highlight-delay nil)
;;(require 'fuzzy-match)
(autoload 'git-blame-mode "git-blame"
"Minor mode for incremental blame for Git." t)
(load-file "~/.emacs.d/lisp/graphviz-dot-mode.el")
;; Javascript
(autoload 'js2-mode "js2" nil t)
;; File assosiation
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
;; Other customizations
;;(load "/Applications/Emacs.app/Contents/Resources/site-lisp/nxml-mode/rng-auto.el")
(require 'aj-nxml)
;;(load "~/.emacs.d/lisp/nxhtml/autostart.el")
(require 'rst)
(add-to-list 'auto-mode-alist '("\\.rst$" . rst-mode))
;; Yasnippet
(require 'yasnippet)
(yas/load-directory "~/.emacs.d/aj-snippets")
(setq yas/prompt-functions '(yas/dropdown-prompt
yas/ido-prompt
yas/completing-prompt
yas/x-prompt
yas/no-prompt))
;; (add-to-list 'yas/extra-mode-hooks
;; 'nxml-mode-hook)
(add-hook 'yas/after-exit-snippet-hook
'(lambda ()
(indent-region yas/snippet-beg
yas/snippet-end)))
(set-variable 'yas/trigger-key "")
(set-variable 'yas/wrap-around-region nil)
(yas/initialize)
;; Find-file-not-found-hooks
(setq major-mode 'org-mode)
;; Default to read-only open files
(require 'aj-read-only-keymap-hooks)
;; Insert snippets to bufferts with certain extensions
(add-hook 'find-file-not-found-hooks
'(lambda ()
(if (equal (file-name-extension (buffer-file-name)) "java")
(progn
(java-mode)
(insert-java-template)
(message "Inserted java template")))
(if (equal (file-name-extension (buffer-file-name)) "html")
(progn
(nxml-mode)
(insert-xhtml-template)
(message "Inserted xhtml template")))))
(setq custom-file "~/.emacs.d/init-custom.el")
(load custom-file 'noerror)
;; Turn of debug
(setq debug-on-error nil)
;; Start server
(server-start)
(message "loaded init.el")