From bdf9a71ab7baa2b1de9abcfd5df1a9107a55d141 Mon Sep 17 00:00:00 2001 From: Jack Jamison Date: Sun, 5 Jul 2026 01:19:30 -0400 Subject: add a bunch of emacs packages HELP --- .../lisp/evil-collection/modes/shortdoc/README.org | 20 +++++++++ .../modes/shortdoc/evil-collection-shortdoc.el | 49 ++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .config/emacs/lisp/evil-collection/modes/shortdoc/README.org create mode 100644 .config/emacs/lisp/evil-collection/modes/shortdoc/evil-collection-shortdoc.el (limited to '.config/emacs/lisp/evil-collection/modes/shortdoc') 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 | == | + | =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 +;; Maintainer: James Nguyen +;; Pierre Neidhardt +;; 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 . + +;;; 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 "") 'forward-button + (kbd "") '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 -- cgit v1.2.3