From 065cde9b92df026a24d926e8c6cfcde64abf4cf6 Mon Sep 17 00:00:00 2001 From: Justin Burkett Date: Wed, 5 Dec 2018 09:57:09 -0500 Subject: [PATCH] ebib: Add initial support --- evil-collection-ebib.el | 60 +++++++++++++++++++++++++++++++++++++++++ evil-collection.el | 1 + 2 files changed, 61 insertions(+) create mode 100644 evil-collection-ebib.el diff --git a/evil-collection-ebib.el b/evil-collection-ebib.el new file mode 100644 index 0000000..989c072 --- /dev/null +++ b/evil-collection-ebib.el @@ -0,0 +1,60 @@ +;;; evil-collection-ebib.el --- Evil bindings for ebib -*- lexical-binding: t -*- + +;; Author: Justin Burkett +;; URL: https://github.com/emacs-evil/evil-collection +;; Version: 0.0.1 +;; Package-Requires: ((emacs "25.1")) +;; Keywords: evil, ebib, tools + +;; This file 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, or (at your +;; option) any later version. +;; +;; This file 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. +;; +;; For a full copy of the GNU General Public License +;; see . + +;;; Commentary: +;; Evil bindings for the ebib. + +;;; Code: +(require 'evil-collection) +(require 'ebib nil t) + +(defconst evil-collection-ebib-maps '(ebib-index-mode-map + ebib-entry-mode-map)) + +;;;###autoload +(defun evil-collection-ebib-setup () + "Set up `evil' bindings for `ebib'." + (evil-set-initial-state 'ebib-index-mode 'normal) + (evil-set-initial-state 'ebib-entry-mode 'normal) + (evil-make-overriding-map ebib-index-mode-map 'normal) + (evil-make-overriding-map ebib-entry-mode-map 'normal) + (evil-collection-define-key 'normal 'ebib-index-mode-map + "j" 'ebib-next-entry + "k" 'ebib-prev-entry + "d" 'ebib-kill-entry + "D" 'ebib-delete-entry + "g" nil + "gg" 'ebib-goto-first-entry + "G" 'ebib-goto-last-entry + "C-u" 'ebib-index-scroll-down + "C-d" 'ebib-index-scroll-up + "n" 'ebib-search-next) + (evil-collection-define-key 'normal 'ebib-entry-mode-map + "j" 'ebib-next-field + "k" 'ebib-prev-field + "d" 'ebib-kill-field-contents + "D" 'ebib-delete-field-contents + "g" nil + "gg" 'ebib-goto-first-field + "G" 'ebib-goto-last-field)) + +(provide 'evil-collection-ebib) +;;; evil-collection-ebib.el ends here diff --git a/evil-collection.el b/evil-collection.el index 9e6b69f..1c898da 100644 --- a/evil-collection.el +++ b/evil-collection.el @@ -112,6 +112,7 @@ See https://github.com/emacs-evil/evil-collection/issues/60 for more details.") diff-mode dired doc-view + ebib edebug ediff eglot