2018-03-07 02:58:57 +01:00
|
|
|
;;; evil-collection-util.el --- Utilities for `evil-collection'. -*- lexical-binding: t -*-
|
|
|
|
|
|
|
|
;; Copyright (C) 2017 James Nguyen
|
|
|
|
|
|
|
|
;; Author: James Nguyen <james@jojojames.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: evil, emacs, 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:
|
|
|
|
;;; Bindings for
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
(require 'evil)
|
|
|
|
|
2018-06-08 19:32:02 +02:00
|
|
|
(declare-function evil-collection-define-key "evil-collection")
|
2018-06-08 19:18:17 +02:00
|
|
|
|
2018-06-06 13:32:19 +02:00
|
|
|
(defmacro evil-collection-util-inhibit-insert-state (map)
|
2018-03-07 02:58:57 +01:00
|
|
|
"Unmap insertion keys from normal state.
|
|
|
|
This is particularly useful for read-only modes."
|
2018-06-05 20:10:15 +02:00
|
|
|
`(evil-collection-define-key
|
2018-06-06 13:32:19 +02:00
|
|
|
'normal ',map
|
2018-03-07 02:58:57 +01:00
|
|
|
[remap evil-append] #'ignore
|
|
|
|
[remap evil-append-line] #'ignore
|
|
|
|
[remap evil-insert] #'ignore
|
|
|
|
[remap evil-insert-line] #'ignore
|
|
|
|
[remap evil-change] #'ignore
|
|
|
|
[remap evil-change-line] #'ignore
|
|
|
|
[remap evil-substitute] #'ignore
|
|
|
|
[remap evil-change-whole-line] #'ignore
|
|
|
|
[remap evil-delete] #'ignore
|
|
|
|
[remap evil-delete-line] #'ignore
|
|
|
|
[remap evil-delete-char] #'ignore
|
|
|
|
[remap evil-delete-backward-char] #'ignore
|
|
|
|
[remap evil-replace] #'ignore
|
|
|
|
[remap evil-replace-state] #'ignore
|
|
|
|
[remap evil-open-below] #'ignore
|
|
|
|
[remap evil-open-above] #'ignore
|
|
|
|
[remap evil-paste-after] #'ignore
|
|
|
|
[remap evil-paste-before] #'ignore
|
|
|
|
[remap evil-join] #'ignore
|
|
|
|
[remap evil-indent] #'ignore
|
|
|
|
[remap evil-shift-left] #'ignore
|
|
|
|
[remap evil-shift-right] #'ignore
|
|
|
|
[remap evil-invert-char] #'ignore))
|
|
|
|
|
|
|
|
(provide 'evil-collection-util)
|
|
|
|
;;; evil-collection-util.el ends here
|