-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
76 lines (62 loc) · 2.39 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
;; Set window title
(setq frame-title-format
'("[" (:eval (user-login-name))
"@" (:eval (system-name))
"] " (:eval (if buffer-file-name
(abbreviate-file-name buffer-file-name) "%b"))
" - Emacs"))
;; Custom file
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file t t)
;; General options
(setq inhibit-startup-screen t
require-final-newline t
tab-always-indent 'complete)
(setq-default display-line-numbers 'relative
indent-tabs-mode t
tab-width 4)
(defvaralias 'c-basic-offset 'tab-width)
(defvaralias 'cperl-indent-level 'tab-width)
(push (expand-file-name "lisp" user-emacs-directory) load-path)
;; Load other parts of the config
(load "functions" nil t)
(load "hooks" nil t)
(load "packages" nil t)
(load "shortcuts" nil t)
;; Backup settings
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t))
backup-directory-alist `((".*" . ,temporary-file-directory))
backup-by-copying t ; Copy all files, don't rename them.
delete-old-versions t ; Don't ask to delete excess backup versions.
kept-new-versions 10 ; Number of newest versions to keep.
kept-old-versions 0 ; Number of oldest versions to keep.
version-control t) ; Use version numbers for backups.
;; Ediff settings
(setq ediff-split-window-function 'split-window-horizontally
ediff-window-setup-function 'ediff-setup-windows-plain)
;; Default frame settings
(setq default-frame-alist '((font . "Hack-13") (width . 120) (height . 42)))
;; Semantic mode options
(setq semantic-default-submodes '(global-semanticdb-minor-mode
global-semantic-idle-scheduler-mode
global-semantic-show-parser-state-mode))
;; File associations
(push '("\\.bash_aliases\\'" . shell-script-mode) auto-mode-alist)
(push '("\\.pam_environment\\'" . conf-unix-mode) auto-mode-alist)
;; Modes
(blink-cursor-mode -1)
(column-number-mode)
(delete-selection-mode)
(electric-pair-mode)
(menu-bar-mode -1)
(show-paren-mode)
(tool-bar-mode -1)
;; https://utf8everywhere.org/
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
;; Allowed operations
(put 'upcase-region 'disabled nil)
(put 'scroll-left 'disabled nil)
(put 'downcase-region 'disabled nil)