-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
231 lines (158 loc) · 6.06 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
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
;;;; IDO
(require 'ido)
(ido-mode (quote both))
(setq ido-enable-flex-matching t)
(setq ido-ignore-buffers '("\\` " "\\*"))
(setq ido-ignore-files '("\\`CVS/" "\\`#" "\\`.#" "\\`\\.\\./" "\\`\\./"))
;;;; IDO end
;; ;;;; ECB
;; (load-file "~/.emacs.d/include/cedet-1.0.1/common/cedet.el")
;; ;;(global-ede-mode 1) ; Enable the Project management system
;; ;;(semantic-load-enable-code-helpers) ; Enable prototype help and smart completion
;; ;;(global-srecode-minor-mode 1) ; Enable template insertion menu
;; (add-to-list 'load-path "~/.emacs.d/include/ecb-snap")
;; (require 'ecb)
;; (add-to-list 'load-path "~/.emacs.d/include/ecb_source_path")
;; (require 'utils)
;; (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.
;; '(ecb-auto-activate t)
;; '(ecb-auto-compatibility-check nil)
;; '(ecb-layout-name "left15")
;; '(ecb-layout-window-sizes (quote (("left15" (ecb-directories-buffer-name 0.3273809523809524 . 0.6888888888888889) (ecb-methods-buffer-name 0.3273809523809524 . 0.28888888888888886)))))
;; '(ecb-primary-secondary-mouse-buttons (quote mouse-1--mouse-2))
;; '(ecb-show-sources-in-directories-buffer (quote always))
;; '(ecb-source-path (quote ("~/")))
;; '(ecb-tip-of-the-day nil)
;; '(ecb-version-check nil))
;; (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.
;; )
;; ;;;; ECB end
;;;; MOUSECONF
(global-set-key [mouse-4] 'scroll-down-one)
(global-set-key [mouse-5] 'scroll-up-one)
(defun scroll-up-one () (interactive) (scroll-up 1))
(defun scroll-down-one () (interactive) (scroll-down 1))
(windmove-default-keybindings)
(setq mouse-autoselect-window t)
;;;; MOUSECONF end
;;;; INTERFACE
(scroll-bar-mode nil)
(tool-bar-mode nil)
(add-to-list 'load-path "~/.emacs.d/include/color-theme-6.6.0/")
(require 'color-theme)
(color-theme-jsc-light)
;; (add-to-list 'load-path "~/.emacs.d/themes/")
;; (require 'sweyla858470)
;; (sweyla858470)
(show-paren-mode t)
;;;; INTERFACE end
;;;; RVM
(add-to-list 'load-path "~/.emacs.d/include/rvm")
(require 'rvm)
(rvm-use-default)
;;;; RVM end
;;;; RINARI
(add-to-list 'load-path "~/.emacs.d/include/rinari")
(require 'rinari)
;;;; RINARI end
;;;; TEXTMATE
(add-to-list 'load-path "~/.emacs.d/include/textmate")
(require 'textmate)
(textmate-mode)
;;;; TEXTMATE end
;;;; RHTMLMODE
(add-to-list 'load-path "~/.emacs.d/include/rhtml")
(require 'rhtml-mode)
(add-hook 'rhtml-mode-hook
(lambda () (rinari-launch)))
;;;; RHTMLMODE end
;;;; TABBARMODE
(add-to-list 'load-path "~/.emacs.d/include/tab-bar")
(require 'tabbar)
;; (tabbar-mode)
;;;; TABBARMODE end
;;;; AUTOCOMPLETEMODE
(add-to-list 'load-path "~/.emacs.d/include/auto-complete")
;;(add-to-list 'ac-dictionary-directory "~/.emacs.d/include/auto-complete/dict")
(require 'auto-complete-config)
;;(require 'auto-complete)
(ac-config-default)
;;;; AUTOCOMPLETEMODE end
;;;; RSENSE
;; WARNING!! you need to install rsense
;; http://cx4a.org/software/rsense/manual.html#Installation
(setq rsense-home (expand-file-name "~/Sources/rsense-0.3"))
(add-to-list 'load-path (concat rsense-home "/etc"))
(require 'rsense)
;; can't find out how to have this in english!
;; (setq rsense-rurema-home "~/Sources/rsense-0.3/refm_1_9_2")
;; Complete by C-c .
;; (add-hook 'ruby-mode-hook
;; (lambda ()
;; (local-set-key (kbd "C-c .") 'ac-complete-rsense)))
(add-hook 'ruby-mode-hook
(lambda ()
(add-to-list 'ac-sources 'ac-source-rsense-method)
(add-to-list 'ac-sources 'ac-source-rsense-constant)))
;;;; RSENSE end
;;;; YASNIPPET
(add-to-list 'load-path "~/.emacs.d/include/yasnippet")
(require 'yasnippet)
(setq yas/snippet-dirs
'("~/.emacs.d/include/yasnippet/snippets" "~/.emacs.d/include/yasnippet/extras/imported"))
(yas/global-mode 1)
;;;; YASNIPPET end
;;;; WRAP
(add-to-list 'load-path "~/.emacs.d/include/wrap-region")
(require 'wrap-region)
(wrap-region-global-mode)
;; (wrap-region-add-wrapper "$" "$")
(wrap-region-add-wrapper "{-" "-}" "#")
;; (wrap-region-add-wrapper "/" "/" nil 'ruby-mode)
;; (wrap-region-add-wrapper "/* " " */" "#" '(java-mode javascript-mode css-mode))
;; (wrap-region-add-wrapper "`" "`" nil '(markdown-mode ruby-mode))
;;;; WRAP end
;;;; SCIAMPUTILS
(add-to-list 'load-path "~/.emacs.d/include/utils")
(require 'sciamp-utils)
(global-set-key [(meta shift l)] 'sciamp-select-current-line)
(global-set-key [(control <)] 'beginning-of-line)
(global-set-key [(control >)] 'end-of-line)
(global-set-key [(control meta <)] 'beginning-of-buffer)
(global-set-key [(control meta >)] 'end-of-buffer)
;; press super after control!
;; maybe we should find some better shortcuts!
(global-set-key [(super control <)] 'sciamp-select-to-the-beginning-of-line)
(global-set-key [(super control >)] 'sciamp-select-to-the-end-of-line)
(global-set-key [(super control meta <)] 'sciamp-select-to-the-beginning-of-buffer)
(global-set-key [(super control meta >)] 'sciamp-select-to-the-end-of-buffer)
;;;; SCIAMPUTILS end
;;;; YAMLMODE
(add-to-list 'load-path "~/.emacs.d/include/yaml-mode")
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
;;;; YAMLMODE end
;;;; MARKDOWNMODE
(add-to-list 'load-path "~/.emacs.d/include/markdown-mode")
(autoload 'markdown-mode "markdown-mode.el"
"Major mode for editing Markdown files" t)
(setq auto-mode-alist
(cons '("\\.md" . markdown-mode) auto-mode-alist))
;;;; MARKDOWNMODE end
;;;; DEFAULWINDOWSIZE
(add-to-list 'default-frame-alist '(height . 50))
(add-to-list 'default-frame-alist '(width . 100))
;;;; DEFAULWINDOWSIZE end
;;;; ZENCODING
(add-to-list 'load-path "~/.emacs.d/include/zencoding")
(require 'zencoding-mode)
(add-hook 'sgml-mode-hook 'zencoding-mode) ;; Auto-start on any markup modes
;;;; ZENCODING end