-
Notifications
You must be signed in to change notification settings - Fork 8
/
+tools.el
43 lines (38 loc) · 1.28 KB
/
+tools.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
;;; +tools.el --- description -*- lexical-binding: t; -*-
;; ssh-deploy config
(after! ssh-deploy
(setq ssh-deploy-on-explicit-save nil))
;; pdf-tools config
;; enable visual-line-mode in the buffer where annotations
;; ... are shown (*Contents*)
(after! pdf-tools
(defun boy/annot-visual-line (_id _buffer)
(let ((contents-buf (get-buffer "*Contents*")))
(when (and contents-buf (not visual-line-mode))
(with-current-buffer contents-buf
(visual-line-mode)))))
;; advice the function responsible for creating the *Contents* buffer
(advice-add 'pdf-annot-list-context-function :after #'boy/annot-visual-line))
;; more fine-grained zooming
(setq pdf-view-resize-factor 1.1)
;; set some default properties for all annotations
(setq pdf-annot-default-annotation-properties
'((t
(label . "carlos")
(color . "#483d8b"))
(text
(icon . "Note"))
(highlight
(color . "#eee8aa"))
(squiggly
(color . "orange"))
(strike-out
(color . "red"))))
;; Magit config
(add-hook! magit-mode (visual-line-mode +1))
;; EIN config
(setq +ein-notebook-dir "~")
(add-hook! ein:notebook-multilang-mode
(map! :map ein:notebook-mode-map
"M-p" #'+boy/up-scroll
"M-n" #'+boy/down-scroll))