Add evil-debbugs

This commit is contained in:
Pierre Neidhardt 2017-11-06 17:51:24 +01:00
parent 13e03e9871
commit 3e832f06a6
2 changed files with 73 additions and 0 deletions

View File

@ -41,6 +41,7 @@
cider
compile
custom
debbugs
debugger
diff-mode
dired

72
evil-debbugs.el Normal file
View File

@ -0,0 +1,72 @@
;;; evil-debbugs.el --- Evil bindings for debbugs -*- lexical-binding: t -*-
;; Copyright (C) 2017 Pierre Neidhardt
;; Author: Pierre Neidhardt <ambrevar@gmail.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: emacs, compile, evil
;; HomePage: https://github.com/jojojames/evil-collection
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
(require 'evil)
(require 'debbugs)
(defun evil-diff-mode-set-keys ()
(evil-set-initial-state 'debbugs-gnu-mode 'motion)
(evil-define-key 'motion debbugs-gnu-mode-map
;; motion
(kbd "<tab>") 'forward-button
(kbd "<backtab>") 'backward-button
(kbd "SPC") 'scroll-up-command
(kbd "<return>") 'debbugs-gnu-select-report
"c" 'debbugs-gnu-send-control-message
"d" 'debbugs-gnu-display-status
;; filtering
(kbd "s") 'debbugs-gnu-narrow-to-status
;; "S" 'debbugs-gnu-widen ; Useless if we can just press "s RET" (empty filter).
"S" 'debbugs-gnu-toggle-suppress
"r" 'debbugs-gnu-show-all-blocking-reports
;; sorting
"o" 'debbugs-gnu-toggle-sort
"O" 'tabulated-list-sort
;; show
"gB" 'debbugs-gnu-show-blocking-reports
"gb" 'debbugs-gnu-show-blocked-by-reports
;; marking
"m" 'debbugs-gnu-toggle-tag
;; update
"gr" 'debbugs-gnu-rescan
;; quit
"q" 'quit-window
"ZQ" 'quit-window
"ZZ" 'quit-window))
(provide 'evil-debbugs)
;;; evil-debbugs.el ends here