Finally fix undo-redo behaviour
Pondering the question why Evil doesn't default to the default undo-redo behaviour natively available in GNU Emacs from the start...
- Author
- Maarten Vangeneugden
- Date
- Sept. 15, 2024, 3:33 p.m.
- Hash
- 9fe7e11018181ecc3b9469f9079a5f1ce4f5344a
- Parent
- debc31edcc2c54768eebbaa7153201b27fd816e1
- Modified file
- init.el
init.el ¶
3 additions and 3 deletions.
View changes Hide changes
1 |
1 |
;; Copyright © 2018-2022 Maarten Vangeneugden |
2 |
2 |
;; Author: Maarten Vangeneugden <contact_me@maartenv.be> |
3 |
3 |
;; URL: https://maartenv.be |
4 |
4 |
;; |
5 |
5 |
;; Welcome to Ghent Emacs. |
6 |
6 |
;; |
7 |
7 |
;; This is the configuration file for Ghent Emacs, a GNU Emacs derivative |
8 |
8 |
;; developed in the city of Ghent, Belgium, by a student of Engineering |
9 |
9 |
;; Informatics at Ghent University. |
10 |
10 |
;; |
11 |
11 |
;; License: GPLv3+ |
12 |
12 |
|
13 |
13 |
;; USAGE: |
14 |
14 |
;; This configuration file uses the use-package declaration, that means the |
15 |
15 |
;; settings are a bit different from what you'd normally do in a GNU Emacs |
16 |
16 |
;; init.el file. Consult https://github.com/jwiegley/use-package for info on how |
17 |
17 |
;; to correctly write package configuration. |
18 |
18 |
|
19 |
19 |
(eval-when-compile |
20 |
20 |
(require 'use-package)) |
21 |
21 |
;(require 'diminish) ;; if you use :diminish |
22 |
22 |
(require 'bind-key) ;; if you use any :bind variant |
23 |
23 |
|
24 |
24 |
(custom-set-variables |
25 |
25 |
;; custom-set-variables was added by Custom. |
26 |
26 |
;; If you edit it by hand, you could mess it up, so be careful. |
27 |
27 |
;; Your init file should contain only one such instance. |
28 |
28 |
;; If there is more than one, they won't work right. |
29 |
29 |
'(custom-safe-themes |
30 |
30 |
'("763bf89898a06b03f7b65fbc29857a1c292e4350246093702fdbd6c4e46e2cf0" "78e6be576f4a526d212d5f9a8798e5706990216e9be10174e3f3b015b8662e27" "d9646b131c4aa37f01f909fbdd5a9099389518eb68f25277ed19ba99adeb7279" "8b58ef2d23b6d164988a607ee153fd2fa35ee33efc394281b1028c2797ddeebb" "f9aede508e587fe21bcfc0a85e1ec7d27312d9587e686a6f5afdbb0d220eab50" "83ae405e25a0a81f2840bfe5daf481f74df0ddb687f317b5e005aa61261126e9" "c433c87bd4b64b8ba9890e8ed64597ea0f8eb0396f4c9a9e01bd20a04d15d358" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a2cde79e4cc8dc9a03e7d9a42fabf8928720d420034b66aecc5b665bbf05d4e9" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" default)) |
31 |
31 |
'(inhibit-startup-screen t) |
32 |
32 |
'(org-agenda-files nil nil nil "Customized with use-package org") |
33 |
33 |
'(package-selected-packages |
34 |
34 |
'(company-fuzzy web-mode use-package undo-tree srefactor spacemacs-theme spaceline solarized-theme rainbow-delimiters pretty-mode page-break-lines monokai-theme helm general evil dashboard dante company-ycmd company-flx company-anaconda clang-format auto-package-update auctex a)) |
35 |
- | '(spaceline-inflation 1 t nil "Customized with use-package spaceline") |
+ |
35 |
'(spaceline-inflation 1 t nil "Customized with use-package spaceline") |
36 |
36 |
'(spaceline-toggle-buffer-size-off nil t nil "Customized with use-package spaceline") |
37 |
37 |
'(warning-suppress-types '((comp)))) |
38 |
38 |
;(custom-set-faces |
39 |
39 |
;; custom-set-faces was added by Custom. |
40 |
40 |
;; If you edit it by hand, you could mess it up, so be careful. |
41 |
41 |
;; Your init file should contain only one such instance. |
42 |
42 |
;; If there is more than one, they won't work right. |
43 |
43 |
;'(default ((((class color) (min-colors 89)) (:foreground "#ffffff" :background "#263238"))))) |
44 |
44 |
|
45 |
45 |
|
46 |
46 |
(add-to-list 'default-frame-alist |
47 |
47 |
'(font . "Hack-11")) |
48 |
48 |
|
49 |
49 |
;; To get rid of those FUCKING ANNOYING BACKUP FILES FUCKING HELL DUDE |
50 |
50 |
(setq backup-directory-alist '(("." . "~/.emacs.d/backup")) |
51 |
51 |
backup-by-copying t ; Don't delink hardlinks |
52 |
52 |
version-control t ; Use version numbers on backups |
53 |
53 |
delete-old-versions t ; Automatically delete excess backups |
54 |
54 |
kept-new-versions 20 ; how many of the newest versions to keep |
55 |
55 |
kept-old-versions 5 ; and how many of the old |
56 |
56 |
) |
57 |
57 |
;; And yes I copied it from SO, suck it: https://stackoverflow.com/questions/2680389/how-to-remove-all-files-ending-with-made-by-emacs |
58 |
58 |
|
59 |
59 |
;; Disables the use of tabs, replaces them with spaces |
60 |
60 |
(setq-default indent-tabs-mode nil) |
61 |
61 |
|
62 |
62 |
;; Activate UTF-8 throughout Ghent Emacs |
63 |
63 |
(prefer-coding-system 'utf-8) |
64 |
64 |
(set-default-coding-systems 'utf-8) |
65 |
65 |
(set-terminal-coding-system 'utf-8) |
66 |
66 |
(set-keyboard-coding-system 'utf-8) |
67 |
67 |
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) |
68 |
68 |
|
69 |
69 |
;; Line numbering config |
70 |
70 |
(global-display-line-numbers-mode) |
71 |
71 |
(setq display-line-numbers-mode t) |
72 |
72 |
(setq display-line-numbers-widen t) |
73 |
73 |
(setq display-line-numbers-type 'relative) |
74 |
74 |
(setq display-line-numbers-current-absolute t) |
75 |
75 |
|
76 |
76 |
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) |
77 |
77 |
(setq scroll-step 1) |
78 |
78 |
(setq scroll-margin 10) ;; Keeps 10 lines above and down always visible if still left |
79 |
79 |
|
80 |
80 |
;; Enable line breaks in all modes at column 80 |
81 |
81 |
(setq-default auto-fill-function 'do-auto-fill) |
82 |
82 |
(setq-default fill-column 80) |
83 |
83 |
|
84 |
84 |
(setq ring-bell-function 'ignore) ;; Disables the FUCKING ANNOYING BEEPS HOLY SHIT |
85 |
85 |
|
86 |
86 |
;; Setup packages |
87 |
87 |
;(package-initialize) |
88 |
88 |
(require 'package) |
89 |
89 |
(setq package-enable-at-startup nil) |
90 |
90 |
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) |
91 |
91 |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) |
92 |
92 |
(unless (package-installed-p 'use-package) |
93 |
93 |
(package-refresh-contents) |
94 |
94 |
(package-install 'use-package)) |
95 |
95 |
|
96 |
96 |
|
97 |
97 |
|
98 |
98 |
|
99 |
99 |
;; Next two lines allow foregoing :ensure t on all packages |
100 |
100 |
;; :ensure t simply makes sure that, if a package isn't installed on this |
101 |
101 |
;; machine, it's automatically fetched and installed. |
102 |
102 |
;; This doesn't keep packages up-to-date, cfr. auto-package-update for that |
103 |
103 |
(require 'use-package-ensure) |
104 |
104 |
(setq use-package-always-ensure t) |
105 |
105 |
|
106 |
106 |
;; Package for automatic updating of all the other packages |
107 |
107 |
(use-package auto-package-update |
108 |
108 |
:config |
109 |
109 |
(setq auto-package-update-delete-old-versions t) |
110 |
110 |
(setq auto-package-update-hide-results t) |
111 |
111 |
(auto-package-update-maybe)) |
112 |
112 |
|
113 |
113 |
;; Easier keybindings so we can do more lazy loading |
114 |
114 |
(use-package general |
115 |
115 |
:config |
116 |
116 |
(general-create-definer my-leader-def |
117 |
117 |
;; :prefix my-leader |
118 |
118 |
:prefix "SPC") |
119 |
119 |
(general-create-definer local-leader-def |
120 |
120 |
;; :prefix local-leader |
121 |
121 |
:prefix ",")) |
122 |
122 |
|
123 |
123 |
(use-package dashboard |
124 |
124 |
:init |
125 |
125 |
(setq dashboard-banner-logo-title "") ; It's nicer to just not have a title text. |
126 |
126 |
(setq dashboard-startup-banner "~/ghent-emacs.png") |
127 |
127 |
:config |
128 |
128 |
(dashboard-setup-startup-hook)) |
129 |
129 |
|
130 |
130 |
;; AUCTeX configuration |
131 |
131 |
;; Partly inspired by https://piotr.is/2010/emacs-as-the-ultimate-latex-editor/ |
132 |
132 |
;;;;(use-package auctex |
133 |
133 |
;;:init |
134 |
134 |
;;(setq TeX-auto-save t) |
135 |
135 |
;;(setq TeX-parse-self t) |
136 |
136 |
;;(setq Tex-save-query nil) |
137 |
137 |
;;) |
138 |
138 |
|
139 |
139 |
;; Updates all packages automatically |
140 |
140 |
(use-package auto-package-update |
141 |
141 |
:config |
142 |
142 |
(setq auto-package-update-delete-old-versions t) |
143 |
143 |
(setq auto-package-update-hide-results t) |
144 |
144 |
(auto-package-update-maybe)) |
145 |
145 |
|
146 |
146 |
;; UI settings |
147 |
147 |
(tool-bar-mode -1) |
148 |
148 |
(menu-bar-mode -1) |
149 |
149 |
(toggle-scroll-bar -1) |
150 |
150 |
|
151 |
151 |
;; Tabs and width |
152 |
152 |
(setq-default tab-width 4) |
153 |
153 |
(setq-default c-basic-offset 4) |
154 |
154 |
|
155 |
155 |
(use-package spaceline |
156 |
156 |
:init |
157 |
157 |
(setq frame-char-height 35) |
158 |
158 |
(setq powerline-height 35) |
159 |
159 |
:custom |
160 |
160 |
(spaceline-toggle-buffer-size-off) |
161 |
161 |
;(setq powerline-height 21) |
162 |
162 |
(spaceline-inflation 1) |
163 |
163 |
(powerline-default-separator 'slant) |
164 |
164 |
:config |
165 |
165 |
(spaceline-spacemacs-theme) |
166 |
166 |
(setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)) |
167 |
167 |
|
168 |
168 |
|
169 |
169 |
(use-package monokai-theme |
170 |
170 |
:config |
171 |
171 |
(load-theme 'monokai t) |
172 |
172 |
(setq monokai-variable-pitch-mode t)) |
173 |
173 |
;; When using solarized as theme, put in :config |
174 |
174 |
;; (setq x-underline-at-descent-line t) |
175 |
175 |
;; Which will block an ugly line being drawn trhough the modeline. |
176 |
176 |
|
177 |
177 |
;(add-hook 'org-mode-hook '(lambda () (setq fill-column 80))) |
178 |
178 |
;(add-hook 'org-mode-hook 'auto-fill-mode) |
179 |
179 |
;; (Programming) languages |
180 |
180 |
|
181 |
181 |
|
182 |
182 |
|
183 |
183 |
(use-package dante |
184 |
184 |
:after haskell-mode |
185 |
185 |
:commands 'dante-mode |
186 |
186 |
:init |
187 |
187 |
(add-hook 'haskell-mode-hook 'dante-mode) |
188 |
188 |
(add-hook 'haskell-mode-hook 'flycheck-mode)) |
189 |
189 |
|
190 |
190 |
|
191 |
191 |
;; HTML/CSS/Django |
192 |
192 |
(use-package web-mode |
193 |
193 |
:mode "\\.html?\\.djhtml\\'" |
194 |
194 |
:init |
195 |
195 |
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) |
196 |
196 |
(setq web-mode-markup-indent-offset 4) |
197 |
197 |
(setq web-mode-css-indent-offset 4) |
198 |
198 |
(setq web-mode-code-indent-offset 4) |
199 |
199 |
;(setq web-mode-engines-alist |
200 |
200 |
; '(("django" . "\\.html\\"))) ;; FIXME this doesn't work yet. IDK why. |
201 |
201 |
:custom ;; Next lines disable all the automatic completion stuff that I didn't explicitely ask for |
202 |
202 |
(web-mode-enable-auto-pairing nil) |
203 |
203 |
(web-mode-enable-auto-closing nil) |
204 |
204 |
(web-mode-enable-auto-expanding nil) |
205 |
205 |
(web-mode-enable-auto-opening nil) |
206 |
206 |
(web-mode-enable-auto-quoting nil)) |
207 |
207 |
|
208 |
208 |
|
209 |
209 |
;;(use-package ycmd-mode |
210 |
210 |
;;:ensure ycmd |
211 |
211 |
;;;:hook (after-init . global-ycmd-mode) |
212 |
212 |
;;:hook (haskell-mode elisp-mode python-mode c-mode c++-mode) ; Add the modes of the languages where YCM |
213 |
213 |
;;; needs to kick in |
214 |
214 |
;;:init |
215 |
215 |
;;; Old paths |
216 |
216 |
;;;(set-variable 'ycmd-server-command `("/usr/bin/python" ,(file-truename "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/"))) |
217 |
217 |
;;;(set-variable 'ycmd-global-config "/home/simba/.emacs.d/lang/ycm_conf.py") |
218 |
218 |
;;(set-variable 'ycmd-server-command `("python" ,(file-truename "~/ycmd/ycmd"))) |
219 |
219 |
;;(set-variable 'ycmd-global-config (file-truename "~/Repositories/rc/.ycm_extra_conf.py")) |
220 |
220 |
;;(set-variable 'ycmd-global-modes 'all) ; Activates YCMD in 'all' major modes, |
221 |
221 |
;;; not only those in ycmd-file-type-map |
222 |
222 |
;;;(set-variable 'ycmd-extra-conf-whitelist '("/home/jorrit/Dev/*")) |
223 |
223 |
;;:config |
224 |
224 |
;;(setq url-show-status nil) ; Makes those FUCKING annoying messages SHUT THE HELL UP |
225 |
225 |
;;(setq request-message-level -1) |
226 |
226 |
|
227 |
227 |
;;(use-package flycheck-ycmd |
228 |
228 |
;;:ensure t |
229 |
229 |
;;:commands (flycheck-ycmd-setup) |
230 |
230 |
;;:hook (ycmd-mode . flycheck-ycmd-setup) |
231 |
231 |
;;:init |
232 |
232 |
;;(setq flycheck-clang-language-standard "c++11") |
233 |
233 |
;;(when (not (display-graphic-p)) |
234 |
234 |
;;(setq flycheck-indication-mode nil)))) |
235 |
235 |
|
236 |
236 |
(use-package company |
237 |
237 |
:hook (after-init . global-company-mode) |
238 |
238 |
:init |
239 |
239 |
(company-tng-configure-default) ; Use <TAB> to scroll in completion options |
240 |
240 |
(setq company-minimum-prefix-length 2) |
241 |
241 |
(setq company-idle-delay 0.0)) |
242 |
242 |
;:config |
243 |
243 |
;;(use-package company-ycmd-mode |
244 |
244 |
;;:ensure company-ycmd |
245 |
245 |
;;:commands (company-ycmd-setup) |
246 |
246 |
;;:hook (ycmd-mode . company-ycmd-setup)) |
247 |
247 |
;;(use-package company-flx |
248 |
248 |
;;:ensure t |
249 |
249 |
;;:config |
250 |
250 |
;;(company-flx-mode +1))) |
251 |
251 |
;; |
252 |
252 |
(use-package company-fuzzy |
253 |
253 |
:hook (company-mode . company-fuzzy-mode) |
254 |
254 |
:init |
255 |
255 |
(setq company-fuzzy-sorting-backend 'flx |
256 |
256 |
company-fuzzy-prefix-on-top nil |
257 |
257 |
company-fuzzy-history-backends '(company-yasnippet) |
258 |
258 |
company-fuzzy-trigger-symbols '("." "->" "<" "\"" "'" "@"))) |
259 |
259 |
|
260 |
260 |
(global-company-fuzzy-mode 1) |
261 |
261 |
|
262 |
262 |
(use-package clang-format |
263 |
263 |
:general |
264 |
264 |
(local-leader-def |
265 |
265 |
:states 'normal |
266 |
266 |
:modes '(c-mode-map c++-mode-map) |
267 |
267 |
"b" '(:ignore t :which-key "clang") |
268 |
268 |
"bf" 'clang-format-buffer) |
269 |
269 |
:init |
270 |
270 |
(setq-default clang-format-style "{BasedOnStyle: llvm, IndentWidth: 4}")) |
271 |
271 |
|
272 |
272 |
;; eViL-mode |
273 |
273 |
(use-package evil |
274 |
274 |
:hook (after-init . evil-mode) |
275 |
275 |
:bind (:map evil-normal-state-map ;; Scrolls over lines correctly |
276 |
276 |
("j" . evil-next-visual-line) |
277 |
277 |
("k" . evil-previous-visual-line)) |
278 |
278 |
:general |
279 |
279 |
(my-leader-def |
280 |
280 |
:states 'normal |
281 |
281 |
"b" '(:ignore t :which-key "buffer") |
282 |
282 |
"g" '(:ignore t :which-key "magit") |
283 |
283 |
"f" '(:ignore t :which-key "files") |
284 |
284 |
"bk" 'kill-this-buffer |
285 |
285 |
"bd" 'kill-other-buffers |
286 |
286 |
"bh" 'switch-to-home-buffer |
287 |
287 |
"br" 'revert-buffer |
288 |
288 |
"h" 'split-window-vertically |
289 |
289 |
"v" 'split-window-horizontally) |
290 |
290 |
(local-leader-def |
291 |
291 |
:states 'normal |
292 |
292 |
;; General lang options |
293 |
293 |
"c" 'compile) |
294 |
294 |
:init |
295 |
295 |
(setq evil-find-skip-newlines t) ;; Allows f/F/t/T to search beyond CR/LF |
296 |
296 |
(setq evil-set-undo-system 'undo-tree) ;; Sets EViL up to use undo (after a |
297 |
- | ;; weird 2020 patch) |
298 |
- | (setq evil-want-C-u-scroll t)) ;; Activates c-u scroll to above. |
+ |
297 |
;; a normal human expects |
+ |
298 |
(setq evil-want-C-u-scroll t)) ;; Activates c-u scroll to above. |
299 |
299 |
|
300 |
300 |
;; About smooth-scrolling: I'd normally just use some variables for scrolling |
301 |
301 |
;; but they all fail with org-mode. This package fixes everything that's wrong for me. |
302 |
302 |
;(use-package smooth-scrolling |
303 |
303 |
;:config |
304 |
304 |
;(smooth-scrolling-mode 1)) |
305 |
305 |
|
306 |
306 |
(use-package org |
307 |
307 |
:pin "org" |
308 |
308 |
; FIXME This causes some errors with bind-keys or what have you. Commented |
309 |
309 |
; until it is fixed. |
310 |
310 |
;:bind (:bind-keymap |
311 |
311 |
; ("C-c x" . org-todo-state-map) |
312 |
312 |
; :map org-todo-state-map |
313 |
313 |
; ("x" . #'(lambda nil (interactive) (org-todo "CANCELLED"))) |
314 |
314 |
; ("d" . #'(lambda nil (interactive) (org-todo "DONE"))) |
315 |
315 |
; ("f" . #'(lambda nil (interactive) (org-todo "DEFERRED"))) |
316 |
316 |
; ("l" . #'(lambda nil (interactive) (org-todo "DELEGATED"))) |
317 |
317 |
; ("s" . #'(lambda nil (interactive) (org-todo "STARTED"))) |
318 |
318 |
; ("w" . #'(lambda nil (interactive) (org-todo "WAITING")))) |
319 |
319 |
; :map org-mode-map |
320 |
320 |
; ("C-c x" . org-todo-state-map)) |
321 |
321 |
:init |
322 |
322 |
(define-key mode-specific-map [?a] 'org-agenda) |
323 |
323 |
:custom |
324 |
324 |
;; Because I use XeLaTeX (it's objectively better), some variables need to be |
325 |
325 |
;; set so org-mode knows what to call. |
326 |
326 |
|
327 |
327 |
;; Okay, so you cán export asynchronous so compiling your PDF doesn't lock up |
328 |
328 |
;; the editor completely, but for one reason or another, you MUST set the |
329 |
329 |
;; async-debug to nil. Otherwise it will constantly "exit abnormally" without |
330 |
330 |
;; reason. This fixes it, who knows why. |
331 |
331 |
(org-export-async-debug nil) |
332 |
332 |
|
333 |
333 |
(org-latex-compiler 'xelatex) ; Makes sure the XeLaTeX compiler is used |
334 |
334 |
|
335 |
335 |
; Tells Org to use dvisvgm because dvipng does not support XeLaTeX's output format |
336 |
336 |
(org-preview-latex-default-process 'dvisvgm) |
337 |
337 |
|
338 |
338 |
; This edits the preview process so it works correctly with XeLaTeX. |
339 |
339 |
; Changes: |
340 |
340 |
; - "latex" to "xelatex" |
341 |
341 |
; - Added the "-no-pdf" flag so it prints an XDV file instead of PDF. |
342 |
342 |
; - change input type from dvi to xdv |
343 |
343 |
; - Only leave the dvisvgm option because I don't need the others |
344 |
344 |
(org-preview-latex-process-alist |
345 |
345 |
(quote |
346 |
346 |
((dvisvgm :programs |
347 |
347 |
("xelatex" "dvisvgm") |
348 |
348 |
:description "dvi > svg" :message "you need to install the programs: xelatex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust |
349 |
349 |
(1.7 . 1.5) |
350 |
350 |
:latex-compiler |
351 |
351 |
("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f") |
352 |
352 |
:image-converter |
353 |
353 |
("dvisvgm %f -n -b min -c %S -o %O"))))) |
354 |
354 |
|
355 |
355 |
;; Sets the formatting options. I only changed :scale to 1.6, but I don't know |
356 |
356 |
;; how to change only thát, so for now I'm configuring the entire variable |
357 |
357 |
(org-format-latex-options (quote |
358 |
358 |
(:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers |
359 |
359 |
("begin" "$1" "$" "$$" "\\(" "\\[")))) |
360 |
360 |
|
361 |
361 |
;; Sets the directory in which the preview fragments are stored to the /tmp |
362 |
362 |
;; folder. Otherwise it clutters up the folder in which the source resides |
363 |
363 |
;; with what are essentially cache files. |
364 |
364 |
(org-preview-latex-image-directory "/tmp/ltximg/") |
365 |
365 |
|
366 |
366 |
;; Following customizations are in regard to org-agenda configuration. |
367 |
367 |
(org-agenda-files (quote ("~/shared/planning/planning.org"))) |
368 |
368 |
(org-default-notes-file "~/shared/planning/notes.org") |
369 |
369 |
(org-agenda-span 62) |
370 |
370 |
(org-deadline-warning-days 14) |
371 |
371 |
(org-agenda-show-all-dates t) |
372 |
372 |
(org-agenda-skip-deadline-if-done t) |
373 |
373 |
(org-agenda-skip-scheduled-if-done t) |
374 |
374 |
(org-agenda-start-on-weekday nil) |
375 |
375 |
(org-reverse-note-order t) |
376 |
376 |
(org-fast-tag-selection-single-key (quote expert)) |
377 |
377 |
(org-agenda-custom-commands |
378 |
378 |
(quote (("d" todo "DELEGATED" nil) |
379 |
379 |
("c" todo "DONE|DEFERRED|CANCELED" nil) |
380 |
380 |
("w" todo "WAITING" nil) |
381 |
381 |
("W" agenda "" ((org-agenda-ndays 21))) |
382 |
382 |
("A" agenda "" |
383 |
383 |
((org-agenda-skip-function |
384 |
384 |
(lambda nil |
385 |
385 |
(org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"))) |
386 |
386 |
(org-agenda-ndays 1) |
387 |
387 |
(org-agenda-overriding-header "Today's Priority #A tasks: "))) |
388 |
388 |
("u" alltodo "" |
389 |
389 |
((org-agenda-skip-function |
390 |
390 |
(lambda nil |
391 |
391 |
(org-agenda-skip-entry-if (quote scheduled) (quote deadline) |
392 |
392 |
(quote regexp) "\n]+>"))) |
393 |
393 |
(org-agenda-overriding-header "Unscheduled TODO entries: ")))))) |
394 |
394 |
(org-capture-store-without-prompt t) |
395 |
395 |
(org-capture-templates |
396 |
396 |
(quote ((116 "* TODO %?\n %u" "~/Repositories/private/org/planning.org" "Tasks") |
397 |
397 |
(110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes")))) |
398 |
398 |
(capture-annotation-functions (quote (org-capture-annotation))) |
399 |
399 |
(capture-handler-functions (quote (org-capture-handler)))) |
400 |
400 |
|
401 |
401 |
;:general |
402 |
402 |
;(local-leader-def |
403 |
403 |
; :states 'normal |
404 |
404 |
; :keymaps 'org-mode-map |
405 |
405 |
; "e" 'org-export-dispatch |
406 |
406 |
; "x" 'org-table-export |
407 |
407 |
; "." 'org-time-stamp |
408 |
408 |
; "t" 'org-twbs-export-to-html |
409 |
409 |
; "s" 'org-schedule |
410 |
410 |
; "d" 'org-deadline |
411 |
411 |
; "'" 'org-edit-special) |
412 |
412 |
; :config |
413 |
413 |
; ;; log todo items with timestamp |
414 |
414 |
; (setq org-log-done 'time)) |
415 |
415 |
|
416 |
416 |
(use-package helm |
417 |
417 |
:hook (after-init . helm-mode) |
418 |
418 |
:commands (helm-autoresize-mode) |
419 |
419 |
:init |
420 |
420 |
;; (defvar helm-google-suggest-use-curl-p) |
421 |
421 |
(defvar helm-ff-search-library-in-sexp) |
422 |
422 |
(defvar helm-echo-input-in-header-line) |
423 |
423 |
(defvar helm-ff-file-name-history-use-recentf) |
424 |
424 |
:general |
425 |
425 |
(general-define-key |
426 |
426 |
"M-x" 'helm-M-x |
427 |
427 |
"M-:" 'helm-eval-expression |
428 |
428 |
"C-c h" 'helm-command-prefix) |
429 |
429 |
(general-define-key |
430 |
430 |
:keymaps 'helm-map |
431 |
431 |
"<tab>" 'helm-execute-persistent-action |
432 |
432 |
"C-i" 'helm-execute-persistent-action |
433 |
433 |
"C-z" 'helm-select-action) |
434 |
434 |
(my-leader-def |
435 |
435 |
:states 'normal |
436 |
436 |
"bb" 'helm-buffers-list |
437 |
437 |
"ff" 'helm-find-files |
438 |
438 |
"p" 'helm-show-kill-ring) |
439 |
439 |
:config |
440 |
440 |
(setq helm-split-window-inside-p t ; open helm buffer inside current window, not occupy whole other window |
441 |
441 |
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source. |
442 |
442 |
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp. |
443 |
443 |
helm-scroll-amount 8 ; scroll 8 lines other window using m-<next>/m-<prior> |
444 |
444 |
helm-ff-file-name-history-use-recentf t |
445 |
445 |
helm-echo-input-in-header-line t) |
446 |
446 |
|
447 |
447 |
;; hide some autogenerated files from helm |
448 |
448 |
(setq helm-ff-skip-boring-files t) |
449 |
449 |
;; (add-to-list 'helm-boring-file-regexp-list "\\~$") |
450 |
450 |
|
451 |
451 |
(setq helm-autoresize-max-height 0) |
452 |
452 |
(setq helm-autoresize-min-height 20) |
453 |
453 |
(helm-autoresize-mode 1)) |
454 |
454 |
|
455 |
455 |
|
456 |
456 |
(use-package rainbow-delimiters |
457 |
457 |
:hook (prog-mode . rainbow-delimiters-mode)) |
458 |
458 |
|
459 |
459 |
;; Settings for having an LaTeX beamer class export tool |
460 |
460 |
(unless (boundp 'org-export-latex-classes) |
461 |
461 |
(setq org-export-latex-classes nil)) |
462 |
462 |
(add-to-list 'org-export-latex-classes |
463 |
463 |
;; beamer class, for presentations |
464 |
464 |
'("beamer" |
465 |
465 |
"\\documentclass[11pt]{beamer}\n |
466 |
466 |
\\mode<{{{beamermode}}}>\n |
467 |
467 |
\\usetheme{{{{beamertheme}}}}\n |
468 |
468 |
\\usecolortheme{{{{beamercolortheme}}}}\n |
469 |
469 |
\\beamertemplateballitem\n |
470 |
470 |
\\setbeameroption{show notes} |
471 |
471 |
\\usepackage[utf8]{inputenc}\n |
472 |
472 |
\\usepackage[T1]{fontenc}\n |
473 |
473 |
\\usepackage{hyperref}\n |
474 |
474 |
\\usepackage{color} |
475 |
475 |
\\usepackage{listings} |
476 |
476 |
\\lstset{numbers=none,language=[ISO]C++,tabsize=4, |
477 |
477 |
frame=single, |
478 |
478 |
basicstyle=\\small, |
479 |
479 |
showspaces=false,showstringspaces=false, |
480 |
480 |
showtabs=false, |
481 |
481 |
keywordstyle=\\color{blue}\\bfseries, |
482 |
482 |
commentstyle=\\color{red}, |
483 |
483 |
}\n |
484 |
484 |
\\usepackage{verbatim}\n |
485 |
485 |
\\institute{{{{beamerinstitute}}}}\n |
486 |
486 |
\\subject{{{{beamersubject}}}}\n" |
487 |
487 |
|
488 |
488 |
("\\section{%s}" . "\\section*{%s}") |
489 |
489 |
|
490 |
490 |
("\\begin{frame}[fragile]\\frametitle{%s}" |
491 |
491 |
"\\end{frame}" |
492 |
492 |
"\\begin{frame}[fragile]\\frametitle{%s}" |
493 |
493 |
"\\end{frame}"))) |
494 |
494 |
|
495 |
495 |
;; Adds a letter class, for formal letters |
496 |
496 |
|
497 |
497 |
(add-to-list 'org-export-latex-classes |
498 |
498 |
|
499 |
499 |
'("letter" |
500 |
500 |
"\\documentclass[11pt]{letter}\n |
501 |
501 |
\\usepackage[utf8]{inputenc}\n |
502 |
502 |
\\usepackage[T1]{fontenc}\n |
503 |
503 |
\\usepackage{color}" |
504 |
504 |
|
505 |
505 |
("\\section{%s}" . "\\section*{%s}") |
506 |
506 |
("\\subsection{%s}" . "\\subsection*{%s}") |
507 |
507 |
("\\subsubsection{%s}" . "\\subsubsection*{%s}") |
508 |
508 |
("\\paragraph{%s}" . "\\paragraph*{%s}") |
509 |
509 |
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) |
510 |
510 |
|
511 |
511 |
|
512 |
512 |
(custom-set-faces |
513 |
513 |
;; custom-set-faces was added by Custom. |
514 |
514 |
;; If you edit it by hand, you could mess it up, so be careful. |
515 |
515 |
;; Your init file should contain only one such instance. |
516 |
516 |
;; If there is more than one, they won't work right. |
517 |
517 |
'(default ((t (:background nil))))) |
518 |
518 |
|
519 |
519 |
|
520 |
520 |
;; This is to fix the retarded scrolling behaviour in Emacs as much as possible: |
521 |
521 |
(setq redisplay-dont-pause t |
522 |
522 |
scroll-margin 1 |
523 |
523 |
scroll-step 1 |
524 |
524 |
scroll-conservatively 10000 |
525 |
525 |
scroll-preserve-screen-position 1) |
526 |
526 |
;; Stops Emacs from accelerating my scroll: |
527 |
527 |
(setq mouse-wheel-progressive-speed nil) |
528 |
528 |
;; Makes scrolling do 5 lines at a time, otherwise it's pretty slow |
529 |
529 |
(setq mouse-wheel-scroll-amount '(2)) |
530 |
530 |