-
Notifications
You must be signed in to change notification settings - Fork 1
/
emrc-defaults.el
130 lines (110 loc) · 2.87 KB
/
emrc-defaults.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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
;;; emrc-defaults.el --- Metapackage for some defaults and a couple of packages -*- lexical-binding: t -*-
;; Homepage: https://github.com/a13/emacs.d
;; Version: 0.0.1
;; Package-Requires: ((emacs "25.2") (use-package "2.0") (iqa) (exec-path-from-shell) (sudo-edit))
;;; Commentary:
;;; Code:
(use-package emacs
:ensure nil
:init
(put 'narrow-to-region 'disabled nil)
(put 'downcase-region 'disabled nil)
:custom
(scroll-step 1)
(inhibit-startup-screen t "Don't show splash screen")
(use-dialog-box nil "Disable dialog boxes")
(enable-recursive-minibuffers t "Allow minibuffer commands in the minibuffer")
(indent-tabs-mode nil "Don't indent with tabs.")
(debug-on-quit nil))
(use-package files
:ensure nil
:hook
(before-save . delete-trailing-whitespace)
:custom
(require-final-newline t)
;; backup settings
(backup-by-copying t)
;; (backup-directory-alist
;; '(("." . "~/.cache/emacs/backups")))
(delete-old-versions t)
(kept-new-versions 6)
(kept-old-versions 2)
(version-control t))
(use-package autorevert
:ensure nil
:diminish auto-revert-mode)
(use-package iqa
:config
(iqa-setup-default))
(use-package cus-edit
:ensure nil
:custom
;; alternatively, one can use `(make-temp-file "emacs-custom")'
(custom-file null-device "Don't store customizations"))
(use-package epa
:ensure nil
:custom
(epg-gpg-program "gpg")
(epa-pinentry-mode nil))
(use-package uniquify
:ensure nil
:custom
(uniquify-buffer-name-style 'forward))
(use-package tramp
:ensure nil
:custom
(tramp-backup-directory-alist backup-directory-alist)
(tramp-default-method "ssh")
(tramp-default-proxies-alist nil))
(use-package sudo-edit
:bind (:map ctl-x-map
("M-s" . sudo-edit)))
(use-package frame
:ensure nil
;; disable suspending on C-z
:bind
("C-z" . nil))
(use-package delsel
:ensure nil
;; C-c C-g always quits minubuffer
:bind
(:map mode-specific-map
("C-g" . minibuffer-keyboard-quit)))
(use-package simple
:ensure nil
:diminish
((visual-line-mode . " ↩")
(auto-fill-function . " ↵"))
:config
(column-number-mode t)
(toggle-truncate-lines 1)
:bind
;; remap ctrl-w/ctrl-h
(("C-w" . backward-kill-word)
("C-h" . delete-backward-char)
:map ctl-x-map
("C-k" . kill-region)
:map mode-specific-map
("h" . help-command)))
(use-package ibuffer
:ensure nil
:bind
([remap list-buffers] . ibuffer))
(use-package exec-path-from-shell
:config
(exec-path-from-shell-initialize))
(use-package isearch
:ensure nil
:bind
;; TODO: maybe get a keybinding from global map
(:map isearch-mode-map
("C-h" . isearch-delete-char)))
(use-package mb-depth
:ensure nil
:config
(minibuffer-depth-indicate-mode 1))
;; Local Variables:
;; eval: (add-hook 'after-save-hook (lambda ()(org-babel-tangle)) nil t)
;; End:
(provide 'emrc-defaults)
;;; emrc-defaults.el ends here