blob: 97bb0b4357523c12a23186bc5b441b67f32e904a (
plain)
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
|
(setq tab-always-indent 'complete
completion-cycle-threshold t)
(setq scroll-conservatively most-positive-fixnum)
(when (version<= "26.0.50" emacs-version)
(global-display-line-numbers-mode))
(setq vc-follow-symlinks t)
(setq find-file-visit-truename t)
;; Disable evil operation writes clipboard
(setq x-select-enable-clipboard nil)
(setq
backup-by-copying t
delete-old-versions t
kept-new-versions 10
kept-old-versions 2
version-control t
backup-directory-alist `(("." . ,(concat user-emacs-directory "backups"))))
(setq auto-save-file-name-transforms
`((".*" "~/.emacs.d/backups/" t)))
(setq-default fill-column 72)
(setq-default
recentf-max-saved-items 1024
recentf-exclude `("/tmp/"))
(setq show-paren-when-point-inside-paren t
show-paren-when-point-in-periphery t)
(add-hook 'prog-mode-hook #'hs-minor-mode) ;; allow folding
(add-hook 'after-init-hook
(lambda ()
(global-hl-line-mode)
(menu-bar-mode -1)
(xterm-mouse-mode 1) ;; Enable mouse
(tool-bar-mode -1)
(toggle-scroll-bar -1)
(global-auto-revert-mode t)
(global-so-long-mode 1)
(recentf-mode)
(show-paren-mode)
(fset 'yes-or-no-p 'y-or-n-p)))
(with-eval-after-load 'hideshow
(gx/diminish 'hs-minor-mode))
(gx/maybe-require-package 'avy)
(gx/maybe-require-package 'rg)
(gx/maybe-require-package 'esup)
(when (gx/maybe-require-package 'which-key)
(add-hook 'after-init-hook 'which-key-mode))
(with-eval-after-load 'which-key
(gx/diminish 'which-key-mode))
(when (gx/maybe-require-package 'undo-tree)
(add-hook 'after-init-hook 'global-undo-tree-mode))
(with-eval-after-load 'undo-tree
(gx/diminish 'undo-tree-mode))
(provide 'init-misc)
|