-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs
101 lines (68 loc) · 2.82 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
95
96
97
98
99
100
101
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
;; Maximum colors
(setq font-lock-maximum-decoration t)
(setq frame-background-mode 'dark)
;; Backup protocol
(setq backup-directory-alist `(("." . "~/.saves")))
(setq backup-by-copying t)
(ido-mode t)
;; Benjamins anbefalinger!
(global-set-key (kbd "M-s") 'other-window)
(global-set-key (kbd "M-3") 'split-window-horizontally)
(global-set-key (kbd "M-2") 'split-window-vertically)
(setq-default split-window-keep-point nil)
;; Endre kill line til å ta hele linja
(global-set-key (kbd "C-k") 'kill-whole-line)
;; Assosiere .ac med C-mode.
(add-to-list 'auto-mode-alist '("\\.ac$" . c-mode))
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(defvaralias 'c-basic-offset 'tab-width)
;; Inkludere flere package repos.
(when (>= emacs-major-version 24)
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t)
)
;; Auto-complete
(require 'auto-complete)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/dict")
(require 'auto-complete-config)
(ac-config-default)
;; SystemC macros
(fset 'sc-convert-cons
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ("