-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
118 lines (95 loc) · 3.21 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
; add ~/.emacs.d to load-path
(setq dotfiles-dir (file-name-directory
(or (buffer-file-name) load-file-name)))
(setq plugins-dir (expand-file-name "lisp" dotfiles-dir))
(add-to-list 'load-path plugins-dir)
(require 'package)
(package-initialize)
;; Add the user-contributed repository
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/"))
; require evil mode before dimka-global-keys - it uses it
; to define some mappings
(require 'evil)
(evil-mode 1)
(require 'default-vars)
(require 'dimka-global-keys)
(require 'dimka-functions)
;(require 'thing-edit)
;(require 'android-setup)
(require 'whole-line-or-region)
;(require 'php-mode)
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.twig\\'" . web-mode))
; load customisations from this file
; in some cases it is required that it is loded early
; - for exmaple for Color Theme section below
(setq custom-file "~/.emacs.d/.emacs-custom.el")
(load custom-file)
;; Color Theme
(load-theme 'solarized-light)
;; Uniqify
(require 'uniquify)
(setq uniquify-buffer-name-style 'post-forward)
;; Popwin
;(require 'popwin)
;(setq display-buffer-function 'popwin:display-buffer)
;; mark this buffer to be managed by popwin
;(push '("*eshell*" :noselect t :position right :width 50) popwin:special-display-config)
;; JsHint + Flymake
;; (require 'flymake-jshint)
;; (add-hook 'javascript-mode-hook
;; (lambda () (flymake-mode t)))
;; Clojure
(add-hook 'clojure-mode-hook
'paredit-mode
'evil-paredit-mode)
;; Scheme/racket
(add-hook 'scheme-mode-hook
'paredit-mode)
;; Haskell
(add-hook 'haskell-mode-hook
'turn-on-haskell-indentation)
(add-hook 'haskell-mode-hook
(lambda () (haskell-indentation-disable-show-indentations)) t)
;; Global modes
(whole-line-or-region-mode)
(show-paren-mode)
(ido-mode)
;(helm-mode 1)
(global-subword-mode 1)
;; Hippie-expand
(setq hippie-expand-try-functions-list
'(try-expand-all-abbrevs
try-expand-dabbrev
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-complete-file-name-partially
try-complete-file-name)
)
;; Ido-mode customizations
;; disable auto searching for files unless called explicitly
(setq ido-auto-merge-delay-time 99999)
(define-key ido-file-dir-completion-map (kbd "C-c C-s")
(lambda()
(interactive)
(ido-initiate-auto-merge (current-buffer))))
;; Generic hook customizations
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; YaSnippet
;; (add-to-list 'load-path (expand-file-name "yasnippet" plugins-dir))
;; (require 'yasnippet)
;; (setq yas/snippet-dirs '("~/.emacs.d/snippets"))
;; (yas/global-mode 1)
;; Auto Pair
;; (add-to-list 'load-path (expand-file-name "autopair" plugins-dir))
;; (require 'autopair)
;; (autopair-global-mode)
;; Fonts
(set-face-attribute 'default nil :font "Terminus-13:weight=bold")
(set-face-attribute 'variable-pitch nil :font "Terminus-13:weight=bold")
;; Turn off all alarms (visual bell, beeping)
(setq ring-bell-function 'ignore)
(add-hook 'after-init-hook '(lambda() (if window-system (set-frame-size (selected-frame) 120 35))))