branch: elpa/evil-escape commit 32a6c6c31eaa5678205ce658baaab7eb5ca9c9e3 Author: sbenner <sylvain.ben...@ubisoft.com> Commit: sbenner <sylvain.ben...@ubisoft.com>
Add support for compilation buffers --- README.md | 1 + evil-escape.el | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cf4fdb62a9..7304569357 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Press quickly `fd` (or the 2-keys sequence of your choice) to: - quit minibuffer - abort isearch - quit ibuffer +- quit compilation buffers - quit magit buffers - quit help buffers - quit apropos buffers diff --git a/evil-escape.el b/evil-escape.el index a202aa94b5..34777f7048 100644 --- a/evil-escape.el +++ b/evil-escape.el @@ -34,6 +34,7 @@ ;; - escape from evil-iedit-state to normal state ;; - abort evil ex command ;; - quit minibuffer +;; - quit compilation buffers ;; - abort isearch ;; - quit ibuffer ;; - quit magit buffers @@ -221,10 +222,11 @@ with a key sequence." (defun evil-escape--escape-motion-state () "Return the function to escape from motion state." (cond - ((or (eq 'apropos-mode major-mode) - (eq 'help-mode major-mode) - (eq 'ert-results-mode major-mode) - (eq 'ert-simple-view-mode major-mode)) 'quit-window) + ((or (memq major-mode '(apropos-mode + help-mode + ert-results-mode + ert-simple-view-mode + compilation-mode))) 'quit-window) ((eq 'undo-tree-visualizer-mode major-mode) 'undo-tree-visualizer-quit) ((and (fboundp 'helm-ag--edit-abort) (string-equal "*helm-ag-edit*" (buffer-name))) 'helm-ag--edit-abort)