-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs.portacle
300 lines (255 loc) · 7.44 KB
/
.emacs.portacle
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
;; init
(package-initialize)
(require 'package)
(setq warning-minimum-level :emergency)
(setq inhibit-startup-screen t)
(setq inhibit-startup-message t)
(setq display-time-format (format-time-string "%I:%M %p"))
(setq split-height-threshold nil)
(setq default-directory (expand-file-name (portacle-path "../../projects/")))
(delete-selection-mode 1)
(display-time-mode 1)
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(show-paren-mode 1)
(global-visual-line-mode t)
(blink-cursor-mode 0)
;; reroute to emacs-china
(setq package-archives '(("gnu" . "http://elpa.emacs-china.org/gnu/")
("melpa" . "http://elpa.emacs-china.org/melpa/")
("org" . "http://elpa.emacs-china.org/org/")))
;; keys
(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
(global-set-key (kbd "C-x <right>") 'windmove-right)
(global-set-key (kbd "C-x <left>") 'windmove-left)
(global-set-key (kbd "C--") 'undo)
(global-set-key (kbd "C-=") 'redo)
(global-set-key (kbd "C-f") 'set-mark-command)
(global-set-key (kbd "C-w") 'isearch-backward)
;; config
(use-package aggressive-indent
:ensure t
:config
(add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode)
(add-hook 'lisp-mode-hook #'aggressive-indent-mode))
(use-package all-the-icons
:ensure t)
(use-package anzu
:ensure t
:bind (("C-d" . anzu-query-replace))
:config
(global-anzu-mode +1))
(use-package auto-complete
:ensure t
:config
(ac-config-default))
(use-package auto-package-update
:ensure t
:config
(auto-package-update-maybe)
(auto-package-update-at-time "00:00"))
(use-package beacon
:ensure t
:config
(beacon-mode 1)
(setq beacon-color "#72dfd9"))
(use-package dockerfile-mode
:ensure t
:config
(add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode)))
(use-package dracula-theme
:ensure t
:config
(load-theme 'dracula t t)
(enable-theme 'dracula))
(use-package elfeed
:ensure t
:bind (("C-x f" . elfeed))
:config
(setq elfeed-feeds '("http://xkcd.com/rss.xml")))
(use-package elpy
:ensure t
:config
(elpy-enable))
(use-package expand-region
:ensure t
:bind (("C-a" . er/expand-region)))
(use-package fancy-battery
:ensure t
:config
(add-hook 'after-init-hook #'fancy-battery-mode))
(use-package flx-ido
:ensure t
:config
(ido-everywhere 1)
(flx-ido-mode 1)
(setq ido-enable-flex-matching t)
(setq ido-use-faces nil))
(use-package ghub
:ensure t)
(use-package highlight-indent-guides
:ensure t
:config
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
(setq highlight-indent-guides-method 'character))
(use-package hlinum
:ensure t
:config
(hlinum-activate))
(use-package icomplete
:ensure t
:config
(icomplete-mode 1))
(use-package ido
:ensure t
:config
(ido-mode t))
(use-package ido-grid-mode
:ensure t
:config
(ido-grid-mode 1)
(setq ido-grid-mode-prefix-scrolls t))
(use-package linum
:ensure t
:config
(setq linum-format
(lambda (line)
(concat
(propertize (number-to-string (1- line)) 'face 'linum)
" ")))
(add-hook 'prog-mode-hook 'linum-mode))
(use-package magit
:ensure t
:bind (("C-x m" . magit-status)))
(use-package markdown
:mode (("README\\.md\\'" . gfm-mode)
("\\.md\\'" . markdown-mode)
("\\.markdown\\'" . markdown-mode))
:init (setq markdown-command "multimarkdown"))
(use-package neotree
:ensure t
:bind (("C-x SPC" . neotree-toggle)
("C-c 1" . neotree-dir))
:config
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
(setq neo-window-fixed-size nil)
(setq neo-window-width 35))
(use-package nyan-mode
:ensure t
:config
(nyan-mode 1)
(nyan-start-animation)
(setq nyan-wavy-trail t)
(setq nyan-cat-face-number 3)
(setq nyan-bar-length 24))
(use-package org
:ensure t
:config
(setq org-startup-indented t)
(setq truncate-lines t))
(use-package page-break-lines
:ensure t
:config
(turn-on-page-break-lines-mode))
(use-package pangu-spacing
:ensure t
:config
(global-pangu-spacing-mode 1)
(setq pangu-spacing-real-insert-separtor t))
(use-package paredit
:ensure t
:config
(define-portacle-key "C-<right>" 'paredit-forward)
(define-portacle-key "C-<left>" 'paredit-backward)
(define-portacle-key "C-'" 'paredit-meta-doublequote)
(define-portacle-key "C-c ]" 'paredit-forward-slurp-sexp)
(define-portacle-key "C-c [" 'paredit-backward-slurp-sexp)
(define-portacle-key "C-c C-]" 'paredit-forward-barf-sexp)
(define-portacle-key "C-c C-[" 'paredit-backward-barf-sexp))
(use-package perspective
:ensure t
:config
(persp-mode))
(use-package rainbow-delimiters
:ensure t
:config
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
(add-hook 'comint-mode-hook 'rainbow-delimiters-mode))
(use-package restclient
:ensure t
:bind (("C-x r" . restclient-http-send-current)))
(use-package shell-pop
:ensure t
:bind (("C-t" . shell-pop)
:map comint-mode-map
("<up>" . comint-previous-input)
("<down>" . comint-next-input)))
(use-package smartparens
:ensure t
:config
(smartparens-global-mode t)
(smartparens-strict-mode t)
(sp-pair "<" ">")
(sp-pair "(" ")")
(sp-pair "'" nil :actions :rem))
(use-package smex
:ensure t
:bind (("M-x" . smex)
("M-X" . smex-major-mode-commands)
("C-c M-x" . execute-extended-command))
:config
(smex-initialize))
(use-package spaceline
:ensure t
:config
(spaceline-spacemacs-theme)
(spaceline-toggle-line-column-on))
(use-package spaceline-all-the-icons
:ensure t
:config
(spaceline-all-the-icons-theme))
(use-package ssh
:ensure t
:config
(add-hook 'ssh-mode-hook
(lambda ()
(setq ssh-directory-tracking-mode t)
(shell-dirtrack-mode t)
(setq dirtrackp nil))))
(use-package symon
:ensure t
:config
(setq symon-delay 1)
(setq symon-monitors '(symon-darwin-memory-monitor
symon-darwin-cpu-monitor
symon-darwin-network-rx-monitor
symon-darwin-network-tx-monitor))
(symon-mode))
(use-package tramp
:ensure t
:config
(setq tramp-default-method "ssh"))
(use-package undo-tree
:ensure t
:config
(setq global-undo-tree-mode t)
(defalias 'undo 'undo-tree-undo)
(defalias 'redo 'undo-tree-redo))
(use-package winum
:ensure t
:config
(setq winum-auto-setup-mode-line nil)
(winum-mode))
(use-package zoom-window
:ensure t
:bind (("C-z" . zoom-window-zoom))
:config
(setq zoom-window-mode-line-color nil))
(use-package zone
:ensure t
:config
(setq zone-programs [zone-nyan])
(setq zone-nyan-hide-progress t)
(zone-when-idle 1800))