-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmisc.el
76 lines (59 loc) · 1.9 KB
/
misc.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
;; Start in home directory
(setq default-directory "~/")
(setq initial-scratch-message
";; Postpone today.\n;; Conquer tomorrow.\n\n")
(with-current-buffer (generate-new-buffer "*text*")
(markdown-mode))
;; Fix Emacs defaults
(menu-bar-mode 0)
(tool-bar-mode 0)
(blink-cursor-mode 0)
(column-number-mode 1)
(show-paren-mode t)
(defun my/frame (frame)
(with-selected-frame frame
(when (display-graphic-p)
(scroll-bar-mode 0)
(mouse-wheel-mode t))))
(my/frame (selected-frame))
(add-hook 'after-make-frame-functions 'my/frame)
(set-default 'truncate-lines t)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(setq case-fold-search t
disabled-command-function nil
inhibit-startup-message t
ring-bell-function 'ignore
visible-bell nil)
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq require-final-newline t)
(defalias 'yes-or-no-p 'y-or-n-p)
;; System specific binds
(when (equal system-type 'darwin)
(progn
(setq mac-option-modifier 'super
mac-command-modifier 'meta)))
(when (equal system-type 'gnu/linux)
(progn
(setq x-meta-keysym 'meta
x-super-keysym 'super)))
;; Unbind suspend-frame
(global-unset-key (kbd "C-z"))
(global-unset-key (kbd "C-x C-z"))
(bind-key "C-M-<backspace>" #'delete-indentation)
(bind-key "C-o" #'my/open-line)
;; Backups
(setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups"))))
;; LSP defaults
(setq gc-cons-threshold 100000000)
(setq read-process-output-max (* 1024 1024))
(let ((autosave-dir (concat user-emacs-directory "autosaves/")))
(if (not (file-exists-p autosave-dir))
(make-directory autosave-dir t))
(setq auto-save-file-name-transforms
(append auto-save-file-name-transforms
`((".*" ,autosave-dir t)))))
(setq native-comp-async-report-warnings-errors 0)
(setq fast-but-imprecise-scrolling t)
(setq scroll-conservatively 101)