mirror of
https://github.com/larstvei/dot-emacs.git
synced 2024-11-26 07:28:31 +00:00
use-package pdf-tools
This commit is contained in:
parent
cdc91acd35
commit
0f7a29d0fa
32
init.org
32
init.org
@ -207,8 +207,7 @@
|
|||||||
|
|
||||||
(let* ((package--builtins nil)
|
(let* ((package--builtins nil)
|
||||||
(packages
|
(packages
|
||||||
'(pdf-tools ; Emacs support library for PDF files
|
'(proof-general ; A generic Emacs interface for proof assistants
|
||||||
proof-general ; A generic Emacs interface for proof assistants
|
|
||||||
racket-mode ; Major mode for Racket language
|
racket-mode ; Major mode for Racket language
|
||||||
rustic ; Rust development environment
|
rustic ; Rust development environment
|
||||||
slime ; Superior Lisp Interaction Mode for Emacs
|
slime ; Superior Lisp Interaction Mode for Emacs
|
||||||
@ -698,22 +697,25 @@
|
|||||||
|
|
||||||
* PDF Tools
|
* PDF Tools
|
||||||
|
|
||||||
[[https://github.com/politza/pdf-tools][PDF Tools]] makes a huge improvement on the built-in [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html][doc-view-mode]]; the only
|
[[https://github.com/vedang/pdf-tools][PDF Tools]] makes a huge improvement on the built-in [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html][doc-view-mode]]! Removing
|
||||||
drawback is the =pdf-tools-install= (which has to be executed before the
|
the =header-line-format= gives a very clean PDF-viewer; let's add that to a
|
||||||
package can be used) takes a couple of /seconds/ to execute. Instead of
|
key.
|
||||||
running it at init-time, we'll run it whenever a PDF is opened. Note that
|
|
||||||
it's only slow on the first run!
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
(pdf-loader-install)
|
;; Emacs support library for PDF files
|
||||||
|
(use-package pdf-tools
|
||||||
#+end_src
|
:defer t
|
||||||
|
:mode "\\.pdf\\'"
|
||||||
#+begin_src emacs-lisp
|
:init (pdf-loader-install)
|
||||||
|
:bind (:map pdf-view-mode-map
|
||||||
(add-hook 'pdf-view-mode-hook
|
("c" . (lambda ()
|
||||||
(lambda () (setq header-line-format nil)))
|
(interactive)
|
||||||
|
(if header-line-format
|
||||||
|
(setq header-line-format nil)
|
||||||
|
(nano-modeline-pdf-mode))))
|
||||||
|
("j" . pdf-view-next-line-or-next-page)
|
||||||
|
("k" . pdf-view-previous-line-or-previous-page)))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user