forked from intinig/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
143 lines (121 loc) · 4.11 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
;; Before everything else, keep it real
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
;;
;; This is the original stuff
;;
(add-to-list 'load-path "~/.emacs.d/vendor/")
;; this is so important that it goes here
(setq-default indent-tabs-mode nil)
;; sets the default font to menlo
(defun fontify-frame (frame)
(set-frame-parameter frame 'font "Menlo Regular-14"))
(fontify-frame nil)
(push 'fontify-frame after-make-frame-functions)
;; default window size
(setq default-frame-alist '((width . 105) (height . 40) ))
(custom-set-variables
'(inhibit-startup-screen t)
'(initial-buffer-choice nil))
(custom-set-faces
'(linum ((t (:family "Inconsolata")))))
;; activates forward delete on del key
(global-set-key [kp-delete] 'delete-char)
(setq exec-path (cons "/usr/local/bin" exec-path))
;; this is included
(require 'uniquify)
(setq uniquify-buffer-name-style 'reverse)
(setq uniquify-separator "/")
(setq uniquify-after-kill-buffer-p t) ; rename after killing uniquified
(setq uniquify-ignore-buffers-re "^\\*") ; don't muck with special buffers
(setq auto-mode-alist (cons '("Gemfile$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("Gemfile.lock$" . ruby-mode) auto-mode-alist))
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
(add-hook 'ruby-mode-hook (lambda () (local-set-key "\r" 'newline-and-indent)))
(setq
backup-by-copying t ; don't clobber symlinks
backup-directory-alist
'(("." . "~/.emacs_backups")) ; don't litter my fs tree
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t) ; use versioned backups
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
;; hack until I can make it work via el-get
(require 'peepopen)
;; Here I start configuring it with el-get
(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(require 'el-get)
;; MOAR PACKAGES
;; Add the original Emacs Lisp Package Archive
(add-to-list 'package-archives
'("elpa" . "http://tromey.com/elpa/"))
;; Add the user-contributed repository
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(setq el-get-sources
'((:name apache-mode
:type git
:url "https://github.com/emacsmirror/apache-mode.git")
(:name inf-ruby
:features inf-ruby
:type elpa)
(:name linum-off
:type git
:url "https://github.com/emacsmirror/linum-off.git"
:features linum-off
:post-init (lambda() (global-linum-mode 1)))
(:name textmate
:type git
:url "https://github.com/defunkt/textmate.el.git"
:features textmate
:post-init (lambda () (textmate-mode)))))
(setq el-get-packages
(append
'(magit
apache-mode
autopair
color-theme
color-theme-solarized
folding
gist
nxhtml
org-mode
smooth-scrolling
twittering-mode
rainbow-mode
rvm
ruby-compilation
yasnippet
yaml-mode)
(mapcar 'el-get-source-name el-get-sources)))
(el-get 'sync el-get-packages)
;; Various after-el-get-configurations
(show-paren-mode 1)
(color-theme-solarized-light)
(setq twittering-use-master-password t)
(autopair-global-mode)
(rainbow-mode)
(yas/global-mode)
(rvm-use-default)
(add-to-list 'auto-mode-alist '("\\.htaccess\\'" . apache-mode))
(add-to-list 'auto-mode-alist '("httpd\\.conf\\'" . apache-mode))
(add-to-list 'auto-mode-alist '("srm\\.conf\\'" . apache-mode))
(add-to-list 'auto-mode-alist '("access\\.conf\\'" . apache-mode))
(add-to-list 'auto-mode-alist '("sites-\\(available\\|enabled\\)/" . apache-mode))
;; complicated stuff for erb files
(setq
nxhtml-global-minor-mode t
mumamo-chunk-coloring 'submode-colored
nxhtml-skip-welcome t
indent-region-mode t
rng-nxml-auto-validate-flag nil
nxml-degraded t)
(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . eruby-nxhtml-mumamo-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . eruby-nxhtml-mumamo-mode))
(if
(file-readable-p "~/emacs.local.el")
(load-file "~/emacs.local.el")
)