blob: 628b8a1d30e4b2f1c6c47280b83099bf15d1c2fb (
plain) (
blame)
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
|
;; use soft tabs
(setq-default indent-tabs-mode nil)
;; make prompts accept y or n
(defalias 'yes-or-no-p 'y-or-n-p)
;; no confirmation for non-existent files or buffers
(setq confirm-nonexistent-file-or-buffer nil)
;; disable audible bell
(setq ring-bell-function 'ignore)
;; scroll one line at a time
(setq mouse-wheel-scroll-amount
'(1
((shift) . 5)
((control))))
;; disable scroll acceleration
(setq mouse-wheel-progressive-speed nil)
;; reload buffers automatically when files change on disk
(use-package autorevert
:ensure nil ;; package is bundled with emacs
:diminish auto-revert-mode
:config
(global-auto-revert-mode 1))
;; reload dired buffers automatically and be quit about it
(setq global-auto-revert-non-file-buffers t)
(setq auto-revert-verbose nil)
;; integrate with X clipboard
(setq x-select-enable-clipboard t)
;; ensure clipboard strings are saved into kill ring
(setq save-interprogram-paste-before-kill t)
;; move deleted files to trash
(setq delete-by-moving-to-trash t)
;; show keystrokes immediately
(setq echo-keystrokes 0.1)
;; add directory to buffer name if filename is not unique
(setq uniquify-buffer-name-style 'forward)
;; tetris score file
(setq tetris-score-file (expand-file-name "tetris" user-emacs-directory))
;; automatically determine major-mode for newly created buffers
(setq-default major-mode
(lambda ()
(unless buffer-file-name
(let ((buffer-file-name (buffer-name)))
(set-auto-mode t)))))
;; show human readable sizes in dired
(setq dired-listing-switches "-alh")
;; single space ends a sentence
(setq-default sentence-end-double-space nil)
;; default to 80 chars fill-column
(setq-default fill-column 80)
;; undo/redo window configuration with C-c <left>/<right>
(winner-mode 1)
;; confirm when exiting
(setq confirm-kill-emacs 'y-or-n-p)
(provide 'init-sane-defaults)
|