This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+readers/epub/packages.el
Daniel Nicolai ad4ee80e56 Add convenient scroll keybindings to epub layer
Similar to the keybindings added to the info layer in PR #14188, I here propose to add the same
keybindings to the epub layer. These J/K keybindings are currently undefined in the epub
layer. These keybindings are used in the Zathura document reader, they are very
convenient and I guess they feel very natural and are preferred over d/u by most people.
2020-12-18 23:40:58 +01:00

34 lines
974 B
EmacsLisp

;;; packages.el --- epub layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
;;
;; Author: Jeremy Dormitzer <jeremy.dormitzer@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defconst epub-packages '(nov))
(defun epub/init-nov ()
(use-package nov
:defer t
:mode ("\\.epub\\'" . nov-mode)
:config
(evilified-state-evilify-map nov-mode-map
:mode nov-mode
:bindings
(kbd "H") 'nov-previous-document
(kbd "L") 'nov-next-document
(kbd "[") 'nov-previous-document
(kbd "]") 'nov-next-document
(kbd "d") 'nov-scroll-up
(kbd "u") 'nov-scroll-down
(kbd "J") 'nov-scroll-up
(kbd "K") 'nov-scroll-down
(kbd "gm") 'nov-display-metadata
(kbd "gr") 'nov-render-document
(kbd "gt") 'nov-goto-toc
(kbd "gv") 'nov-view-source
(kbd "gV") 'nov-view-content-source)))