emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil-escape 6cb4fa408a 026/133: Add evil-iedit-state


From: ELPA Syncer
Subject: [nongnu] elpa/evil-escape 6cb4fa408a 026/133: Add evil-iedit-state
Date: Wed, 3 Jan 2024 21:59:49 -0500 (EST)

branch: elpa/evil-escape
commit 6cb4fa408acccc9c7b0cde1441ce68368344ae5d
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>

    Add evil-iedit-state
---
 README.md      |  3 ++-
 evil-escape.el | 23 +++++++++++++++++++----
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 63bf39ed67..070ab09ada 100644
--- a/README.md
+++ b/README.md
@@ -19,8 +19,9 @@ Emacs.
 
 Press quickly `fd` (or the 2-keys sequence of your choice) to:
 
-- escape from all evil states to normal state
+- escape from all stock evil states to normal state
 - escape from evil-lisp-state to normal state
+- escape from evil-iedit-state to normal state
 - abort evil ex command
 - quit minibuffer
 - abort isearch
diff --git a/evil-escape.el b/evil-escape.el
index 1395c2fd12..2c0f7bb105 100644
--- a/evil-escape.el
+++ b/evil-escape.el
@@ -5,7 +5,7 @@
 ;; Author: Sylvain Benner <sylvain.benner@gmail.com>
 ;; Keywords: convenience editing evil
 ;; Created: 22 Oct 2014
-;; Version: 2.01
+;; Version: 2.02
 ;; Package-Requires: ((emacs "24") (evil "1.0.9"))
 ;; URL: https://github.com/syl20bnr/evil-escape
 
@@ -29,8 +29,9 @@
 ;; Press `fd` quickly to:
 ;; ----------------------
 
-;;   - escape from all evil states to normal state
+;;   - escape from all stock evil states to normal state
 ;;   - escape from evil-lisp-state to normal state
+;;   - escape from evil-iedit-state to normal state
 ;;   - abort evil ex command
 ;;   - quit minibuffer
 ;;   - abort isearch
@@ -195,7 +196,14 @@ with a key sequence."
                                     :delete-func isearch-delete-char))
   ;; lisp state if installed
   (eval-after-load 'evil-lisp-state
-    '(eval '(evil-escape-define-escape "lisp-state" evil-lisp-state-map 
evil-normal-state))))
+    '(eval '(evil-escape-define-escape "lisp-state" evil-lisp-state-map 
evil-normal-state)))
+  ;; iedit state if installed
+  (eval-after-load 'evil-iedit-state
+    '(progn
+       (eval '(evil-escape-define-escape "iedit-state" evil-iedit-state-map
+                                         evil-iedit-state/quit-iedit-mode))
+       (eval '(evil-escape-define-escape "iedit-insert-state" 
evil-iedit-insert-state-map
+                                         evil-iedit-state/quit-iedit-mode)))))
 
 (defun evil-escape--undefine-keys ()
   "Unset the key bindings defined in `evil-escape--define-keys'."
@@ -207,7 +215,14 @@ with a key sequence."
     ;; isearch
     (if evil-escape-isearch-shadowed-func
         (define-key isearch-mode-map
-          (kbd first-key) evil-escape-isearch-shadowed-func))))
+          (kbd first-key) evil-escape-isearch-shadowed-func))
+    ;; list state
+    (eval-after-load 'evil-lisp-state
+      '(define-key evil-lisp-state-map (kbd first-key) nil))
+    ;; iedit state
+    (eval-after-load 'evil-iedit-state
+      '(progn (define-key evil-iedit-state-map (kbd first-key) nil)
+              (define-key evil-iedit-insert-state-map (kbd first-key) nil)))))
 
 (defun evil-escape--default-insert-func (key)
   "Insert KEY in current buffer if not read only."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]