|
| 1 | +;;; evil-collection-magit-repos.el --- Bindings for magit-repos -*- lexical-binding: t -*- |
| 2 | + |
| 3 | +;; Copyright (C) 2015-2016, 2021 Justin Burkett |
| 4 | + |
| 5 | +;; Author: Justin Burkett <[email protected]> |
| 6 | +;; Maintainer: Justin Burkett <[email protected]> |
| 7 | +;; James Nguyen <[email protected]> |
| 8 | +;; Pierre Neidhardt <[email protected]> |
| 9 | +;; Package-Requires: ((emacs "26.3") (evil "1.2.3") (magit "2.6.0")) |
| 10 | +;; Homepage: https://github.com/emacs-evil/evil-collection |
| 11 | +;; Version: 0.0.1 |
| 12 | + |
| 13 | +;; This file is free software; you can redistribute it and/or modify |
| 14 | +;; it under the terms of the GNU General Public License as published |
| 15 | +;; by the Free Software Foundation; either version 3, or (at your |
| 16 | +;; option) any later version. |
| 17 | +;; |
| 18 | +;; This file is distributed in the hope that it will be useful, |
| 19 | +;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | +;; GNU General Public License for more details. |
| 22 | +;; |
| 23 | +;; For a full copy of the GNU General Public License |
| 24 | +;; see <http://www.gnu.org/licenses/>. |
| 25 | + |
| 26 | +;;; Commentary: |
| 27 | +;;; Bindings for magit-repos. |
| 28 | + |
| 29 | +;;; Code: |
| 30 | +(require 'evil-collection) |
| 31 | +(require 'magit-repos nil t) |
| 32 | + |
| 33 | +(defvar magit-repolist-mode-map) |
| 34 | +(defconst evil-collection-magit-repos-maps '(magit-repolist-mode-map)) |
| 35 | + |
| 36 | +;;;###autoload |
| 37 | +(defun evil-collection-magit-repos-setup () |
| 38 | + "Set up `evil' bindings for `magit-repos'." |
| 39 | + (evil-set-initial-state 'magit-repolist-mode 'normal) |
| 40 | + (evil-collection-define-key 'normal 'magit-repolist-mode-map |
| 41 | + "m" 'magit-repolist-mark |
| 42 | + "u" 'magit-repolist-unmark |
| 43 | + "f" 'magit-repolist-fetch |
| 44 | + (kbd "RET") 'magit-repolist-status |
| 45 | + (kbd "gr") 'magit-list-repositories) |
| 46 | + (add-hook 'magit-repolist-mode-hook 'evil-normalize-keymaps)) |
| 47 | + |
| 48 | +(provide 'evil-collection-magit-repos) |
| 49 | +;;; evil-collection-magit-repos.el ends here |
0 commit comments