-
Notifications
You must be signed in to change notification settings - Fork 1
/
emacs
94 lines (78 loc) · 2.42 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
;; -*- mode: emacs-lisp -*-
(tool-bar-mode -1)
(scroll-bar-mode -1)
(column-number-mode)
(show-paren-mode)
(unless window-system
(menu-bar-mode -1))
(when (memq window-system '(mac ns))
(set-frame-font "Monaco")
(set-frame-size (selected-frame) 100 55))
(setq inhibit-startup-message t
initial-scratch-message nil
mac-option-modifier nil
mac-command-modifier 'meta
vc-follow-symlinks t
ring-bell-function 'ignore)
(global-set-key (kbd "C-h") 'delete-backward-char)
(global-set-key (kbd "C-.") 'kill-region)
(global-set-key (kbd "C-w") 'backward-kill-word)
(global-set-key (kbd "C-x C-m") 'execute-extended-command)
(global-set-key (kbd "RET") 'newline-and-indent)
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(require 'cl-lib)
(defvar package-list
'(rainbow-mode
molokai-theme
slime
exec-path-from-shell
evil
evil-leader
helm
key-chord
flycheck
jedi))
(defun list-uninstalled-packages ()
(cl-remove-if #'package-installed-p package-list))
(let ((uninstalled-packages (list-uninstalled-packages)))
(when uninstalled-packages
(package-refresh-contents)
(mapcar #'package-install uninstalled-packages)))
(load-theme 'molokai t)
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
(global-evil-leader-mode)
(evil-mode)
(setq key-chord-two-keys-delay 0.5)
(define-key evil-normal-state-map (kbd "C-h") 'windmove-left)
(define-key evil-normal-state-map (kbd "C-l") 'windmove-right)
(define-key evil-normal-state-map (kbd "C-k") 'windmove-up)
(define-key evil-normal-state-map (kbd "C-j") 'windmove-down)
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
(key-chord-define evil-normal-state-map ",," 'evil-buffer)
(key-chord-mode 1)
(evil-leader/set-leader ",")
(evil-leader/set-key
"w" 'save-buffer
"o" 'delete-other-windows)
(require 'uniquify)
(setq uniquify-buffer-name-style 'forward)
(require 'dired-x)
(add-to-list 'dired-omit-extensions ".pyc")
(add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1)))
(setq inferior-lisp-program "sbcl"
common-lisp-hyperspec-root (expand-file-name "~/Documents/HyperSpec/"))
(setq slime-lisp-implementations
'((sbcl ("sbcl"))
(ccl ("ccl"))
(allegro ("alisp"))
(clisp ("clisp"))))
(slime-setup
'(slime-repl
slime-banner
slime-editing-commands
slime-fuzzy
slime-presentations))