summaryrefslogtreecommitdiff
path: root/evil-doc-view.el
diff options
context:
space:
mode:
authorJames Nguyen <james@jojojames.com>2017-12-06 17:41:09 -0800
committerJames Nguyen <james@jojojames.com>2017-12-06 17:50:37 -0800
commit9eb7d3db0d4b7ffbc6ea6c137b0f2ec21f907d53 (patch)
treefee440d522a6270fca6b4989f654e10da8d293a1 /evil-doc-view.el
parent4992d5fb0fd310d73ddc8a8301120552eb9a136f (diff)
Change namespace to evil-collection
Diffstat (limited to 'evil-doc-view.el')
-rw-r--r--evil-doc-view.el80
1 files changed, 0 insertions, 80 deletions
diff --git a/evil-doc-view.el b/evil-doc-view.el
deleted file mode 100644
index 3397276..0000000
--- a/evil-doc-view.el
+++ /dev/null
@@ -1,80 +0,0 @@
-;;; 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, files, pdf, ps, dvi
-
-;; 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 ()
- "Set up `evil' bindings for `doc-view'."
- (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
- "gj" 'doc-view-next-page
- "gk" 'doc-view-previous-page
- (kbd "C-d") 'forward-page
- "j" 'doc-view-next-line-or-next-page
- "k" 'doc-view-previous-line-or-previous-page
- "gg" 'doc-view-first-page
- "G" 'doc-view-last-page
- "J" 'doc-view-goto-page
- (kbd "<return>") 'image-next-line
-
- ;; zoom
- "+" 'doc-view-enlarge
- "=" 'doc-view-enlarge
- "0" 'doc-view-scale-reset
- "-" 'doc-view-shrink
-
- "W" 'doc-view-fit-width-to-window ; Like evil-image.
- "H" 'doc-view-fit-height-to-window ; Like evil-image.
- "P" 'doc-view-fit-page-to-window
- "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
-
- ;; refresh
- (kbd "gr") 'doc-view-revert-buffer)
-
- ;; TODO: What if the user changes `evil-want-C-u-scroll' after this is run?
- (when evil-want-C-u-scroll
- (evil-define-key 'motion doc-view-mode-map
- (kbd "C-u") 'backward-page)))
-
-(provide 'evil-doc-view)
-;;; evil-doc-view.el ends here