aboutsummaryrefslogtreecommitdiff
path: root/.config/emacs/lisp/evil-collection/modes/shortdoc
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2026-07-05 01:19:30 -0400
committerJack Jamison <jackqjamison@gmail.com>2026-07-05 01:19:30 -0400
commitbdf9a71ab7baa2b1de9abcfd5df1a9107a55d141 (patch)
treec4524e6c41aa5107211103401dabfaefc81aa882 /.config/emacs/lisp/evil-collection/modes/shortdoc
parentfe3984f541bd32bdfa418afb305b614176b55ca0 (diff)
add a bunch of emacs packages HELP
Diffstat (limited to '.config/emacs/lisp/evil-collection/modes/shortdoc')
-rw-r--r--.config/emacs/lisp/evil-collection/modes/shortdoc/README.org20
-rw-r--r--.config/emacs/lisp/evil-collection/modes/shortdoc/evil-collection-shortdoc.el49
2 files changed, 69 insertions, 0 deletions
diff --git a/.config/emacs/lisp/evil-collection/modes/shortdoc/README.org b/.config/emacs/lisp/evil-collection/modes/shortdoc/README.org
new file mode 100644
index 0000000..ec50145
--- /dev/null
+++ b/.config/emacs/lisp/evil-collection/modes/shortdoc/README.org
@@ -0,0 +1,20 @@
+* shortdoc
+
+ Evil bindings for [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Groups.html][shortdoc]].
+
+** Key bindings
+
+ Bindings added to =shortdoc-mode-map= in normal state (initial state:
+ normal).
+
+ | Command | Original | Evil |
+ |-----------------------------+----------------+-------------|
+ | =forward-button= | n/a | =TAB= |
+ | =backward-button= | n/a | =<backtab>= |
+ | =shortdoc-next= | =n= | =C-j= |
+ | =shortdoc-previous= | =p= | =C-k= |
+ | =shortdoc-next-section= | =N=, =C-c C-n= | =]]= |
+ | =shortdoc-previous-section= | =P=, =C-c C-p= | =[[= |
+
+ The upstream =n=, =p=, =N=, =P=, =w= keys keep their bindings so they
+ remain available alongside the evil-friendly additions.
diff --git a/.config/emacs/lisp/evil-collection/modes/shortdoc/evil-collection-shortdoc.el b/.config/emacs/lisp/evil-collection/modes/shortdoc/evil-collection-shortdoc.el
new file mode 100644
index 0000000..03e5061
--- /dev/null
+++ b/.config/emacs/lisp/evil-collection/modes/shortdoc/evil-collection-shortdoc.el
@@ -0,0 +1,49 @@
+;;; evil-collection-shortdoc.el --- Evil bindings for shortdoc -*- lexical-binding: t -*-
+
+;; Copyright (C) 2020 Zhiwei Chen
+
+;; Author: Zhiwei Chen <condy0919@gmail.com>
+;; Maintainer: James Nguyen <james@jojojames.com>
+;; Pierre Neidhardt <mail@ambrevar.xyz>
+;; URL: https://github.com/emacs-evil/evil-collection
+;; Version: 0.0.1
+;; TODO: Update to emacs 28.1 when it's out
+;; Package-Requires: ((emacs "27.1"))
+;; Keywords: evil, lisp, help
+
+;; 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 shortdoc.
+
+;;; Code:
+(require 'evil-collection)
+(require 'shortdoc nil t)
+
+(defconst evil-collection-shortdoc-maps '(shortdoc-mode-map))
+
+;;;###autoload
+(defun evil-collection-shortdoc-setup ()
+ "Set up `evil' bindings for `shortdoc'."
+ (evil-set-initial-state 'shortdoc-mode 'normal)
+ (evil-collection-define-key 'normal 'shortdoc-mode-map
+ (kbd "<tab>") 'forward-button
+ (kbd "<backtab>") 'backward-button
+ (kbd "C-k") 'shortdoc-previous
+ (kbd "C-j") 'shortdoc-next
+ "[[" 'shortdoc-previous-section
+ "]]" 'shortdoc-next-section))
+
+(provide 'evil-collection-shortdoc)
+;;; evil-collection-shortdoc.el ends here