Skip to content

Commit

Permalink
Add keybind to center pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
chuxubank committed Jul 3, 2024
1 parent b4505e1 commit 55bed72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cats/+daemon.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

(add-hook 'server-after-make-frame-hook #'cat-client-frame-config)

(when (package-installed-p 'dashboard)
(with-eval-after-load 'dashboard
(defun cat-daemon-init-buffer ()
(get-buffer-create dashboard-buffer-name))
(setq initial-buffer-choice #'cat-daemon-init-buffer))
Expand Down
7 changes: 4 additions & 3 deletions cats/+pdf.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

(use-package pdf-tools
:magic ("%PDF" . pdf-view-mode)
:bind
(:map pdf-view-mode-map
("v" . +pdf-keyboard-select-region)
("C-S-l" . #'pdf-view-center-in-window))
:custom
(pdf-view-use-scaling t)
:hook
Expand Down Expand Up @@ -32,6 +36,3 @@
(setq pdf-view-active-region (list edges))
(pdf-view--push-mark)
(pdf-view-display-region)))

(with-eval-after-load 'pdf-view
(define-key pdf-view-mode-map (kbd "v") #'+pdf-keyboard-select-region))

0 comments on commit 55bed72

Please sign in to comment.