diff options
| author | Brian Leung <leungbk@mailfence.com> | 2020-12-05 17:07:27 -0800 |
|---|---|---|
| committer | James N <james@jojojames.com> | 2020-12-06 18:43:33 -0800 |
| commit | f9ef230569ab58219048179ee857d11d295c6dee (patch) | |
| tree | 10696b07b691b707535322e2f94313552c77ce21 /modes | |
| parent | 9b5ae7b8f41ff89b80aa48061ba262651eaad228 (diff) | |
consult: Add evil bindings
Diffstat (limited to 'modes')
| -rw-r--r-- | modes/consult/evil-collection-consult.el | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/modes/consult/evil-collection-consult.el b/modes/consult/evil-collection-consult.el new file mode 100644 index 0000000..b7e52ca --- /dev/null +++ b/modes/consult/evil-collection-consult.el @@ -0,0 +1,47 @@ +;;; evil-collection-consult.el --- Evil bindings for consult -*- lexical-binding: t -*- + +;; Copyright (C) 2017 James Nguyen + +;; Author: James Nguyen <james@jojojames.com> +;; Maintainer: James Nguyen <james@jojojames.com> +;; Pierre Neidhardt <mail@ambrevar.xyz> +;; URL: https://github.com/emacs-evil/evil-collection +;; Version: 0.0.1 +;; Package-Requires: ((emacs "25.1")) +;; Keywords: evil, consult, tools + +;; 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 `consult'. + +;;; Code: +(require 'evil-collection) +(require 'consult nil t) + +(defun evil-collection-consult-set-bindings () + "Set the bindings." + (evil-set-command-property 'consult-outline :jump t) + (evil-set-command-property 'consult-mark :jump t) + (evil-set-command-property 'consult-line :jump t) + (evil-set-command-property 'consult-line-symbol-at-point :jump t) + (evil-set-command-property 'consult-line-from-isearch :jump t)) + +;;;###autoload +(defun evil-collection-consult-setup () + "Set up `evil' bindings for `consult'." + (evil-collection-consult-set-bindings)) + +(provide 'evil-collection-consult) +;;; evil-collection-consult.el ends here |
