diff options
| author | James Nguyen <james@jojojames.com> | 2017-11-06 22:17:14 -0800 |
|---|---|---|
| committer | James N <james@jojojames.com> | 2017-11-07 17:53:22 -0800 |
| commit | f8ec4d6146c5e5aae62d3b9e03c9d9006038d4b6 (patch) | |
| tree | cf43d132239e87cb1a200b7cdff5fbf849b6f929 /evil-doc-view.el | |
| parent | f03d29d7ac070f206df085f50970a8e80b0a4fc1 (diff) | |
Add doc-view
Diffstat (limited to 'evil-doc-view.el')
| -rw-r--r-- | evil-doc-view.el | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/evil-doc-view.el b/evil-doc-view.el new file mode 100644 index 0000000..c34e968 --- /dev/null +++ b/evil-doc-view.el @@ -0,0 +1,69 @@ +;;; evil-doc-view.el --- Evil bindings for docview. -*- lexical-binding: t -*- + +;; Copyright (C) 2017 James Nguyen + +;; Author: James Nguyen <james@jojojames.com> +;; Maintainer: James Nguyen <james@jojojames.com> +;; Pierre Neidhardt <ambrevar@gmail.com> +;; URL: https://github.com/jojojames/evil-collection +;; Version: 0.0.1 +;; Package-Requires: ((emacs "25.1")) +;; Keywords: evil, bindings +;; HomePage: https://github.com/jojojames/evil-collection + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: +;;; Evil bindings for doc-view. + +;;; Code: +(require 'evil) +(require 'doc-view) + +(defun evil-doc-view-setup () + (evil-set-initial-state 'doc-view-mode 'motion) + (evil-define-key 'motion doc-view-mode-map + (kbd "C-j") 'doc-view-next-page + (kbd "C-k") 'doc-view-previous-page + (kbd "C-d") 'forward-page + (kbd "C-u") 'backward-page + (kbd "j") 'doc-view-next-line-or-next-page + (kbd "k") 'doc-view-previous-line-or-previous-page + (kbd "gg") 'doc-view-first-page + (kbd "G") 'doc-view-last-page + (kbd "J") 'doc-view-goto-page + (kbd "RET") 'image-next-line + (kbd "+") 'doc-view-enlarge + (kbd "0") 'doc-view-scale-reset + (kbd "-") 'doc-view-shrink + (kbd "W") 'doc-view-fit-width-to-window + (kbd "H") 'doc-view-fit-height-to-window + (kbd "P") 'doc-view-fit-page-to-window + (kbd "X") 'doc-view-kill-proc + + (kbd "s s") 'doc-view-set-slice + (kbd "s m") 'doc-view-set-slice-using-mouse + (kbd "s b") 'doc-view-set-slice-from-bounding-box + (kbd "s r") 'doc-view-reset-slice + + (kbd "/") 'doc-view-search + (kbd "?") 'doc-view-search-backward + (kbd "C-t") 'doc-view-show-tooltip + (kbd "C-c C-c") 'doc-view-toggle-display + (kbd "C-c C-t") 'doc-view-open-text + + (kbd "gr") 'doc-view-revert-buffer)) + +(provide 'evil-doc-view) +;;; evil-doc-view.el ends here |
