In DocView (without pdf-tools installed) I could hit C-c C-c
to toggle between viewing-mode and editing-mode. After installing pdf-tools I expected C-c C-c
to act the same. But now it toggles between PDFView and DocView, without any editing mode. What can I do to make it toggle between PDFView and editing mode?
Add a comment
|
2 Answers
The name of the command you would need to invoke to edit the pdf is:
M-x pdf-virtual-edit-mode
I don't think toggling is possible but I may be wrong.
Using the standard hooks to remap C-c C-c
and use it as a toggle key, seems to be the easiest way:
;; edit -> view
(add-hook 'pdf-virtual-edit-mode-hook
(lambda ()
(define-key pdf-virtual-edit-mode-map (kbd "C-c C-c") #'pdf-view-mode)
))
;; view -> edit
(add-hook 'pdf-view-mode-hook
(lambda ()
(define-key pdf-view-mode-map (kbd "C-c C-c") #'pdf-virtual-edit-mode)
))