[Emacs] Better config for PDF reader
Improved keybinds, freed the use of local leader `,'
This commit is contained in:
parent
8604abc87d
commit
00c00f42ef
@ -1633,24 +1633,27 @@ reader?
|
|||||||
:magic ("%PDF" . pdf-view-mode)
|
:magic ("%PDF" . pdf-view-mode)
|
||||||
:straight (:build t)
|
:straight (:build t)
|
||||||
:mode (("\\.pdf\\'" . pdf-view-mode))
|
:mode (("\\.pdf\\'" . pdf-view-mode))
|
||||||
|
:hook (pdf-tools-enabled . pdf-view-midnight-minor-mode)
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(with-eval-after-load 'pdf-view
|
(with-eval-after-load 'pdf-view
|
||||||
(setq pdf-view-midnight-colors '("#d8dee9" . "#2e3440")))
|
(setq pdf-view-midnight-colors '("#d8dee9" . "#2e3440")))
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:keymaps 'pdf-view-mode-map
|
:keymaps 'pdf-view-mode-map
|
||||||
"SPC" nil)
|
"SPC" nil
|
||||||
|
"," nil)
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:states 'normal
|
:states 'normal
|
||||||
:keymaps 'pdf-view-mode-map
|
:keymaps 'pdf-view-mode-map
|
||||||
"SPC" nil
|
"SPC" nil
|
||||||
|
"," nil
|
||||||
"y" #'pdf-view-kill-ring-save
|
"y" #'pdf-view-kill-ring-save
|
||||||
"t" #'evil-collection-pdf-view-next-line-or-next-page
|
"t" #'evil-collection-pdf-view-next-line-or-next-page
|
||||||
"s" #'evil-collection-pdf-view-previous-line-or-previous-page))
|
"s" #'evil-collection-pdf-view-previous-line-or-previous-page)
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:states 'motion
|
:states 'motion
|
||||||
:keymaps 'pdf-view-mode-map
|
:keymaps 'pdf-view-mode-map
|
||||||
:prefix "SPC"
|
:prefix ","
|
||||||
"a" '(nil :which-key "annotations")
|
"a" '(nil :which-key "annotations")
|
||||||
"aD" #'pdf-annot-delete
|
"aD" #'pdf-annot-delete
|
||||||
"at" #'pdf-annot-attachment-dired
|
"at" #'pdf-annot-attachment-dired
|
||||||
@ -1674,10 +1677,7 @@ reader?
|
|||||||
"ss" #'pdf-occur
|
"ss" #'pdf-occur
|
||||||
|
|
||||||
"o" 'pdf-outline
|
"o" 'pdf-outline
|
||||||
"m" 'pdf-view-midnight-minor-mode)
|
"m" 'pdf-view-midnight-minor-mode)))
|
||||||
|
|
||||||
:hook
|
|
||||||
(pdf-tools-enabled . pdf-view-midnight-minor-mode))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
Loading…
Reference in New Issue
Block a user