Skip to content

Commit

Permalink
Quit ert buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Nov 23, 2014
1 parent 37c227e commit 5da641b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Press `fd` quickly to:
- quit magit buffers
- quit help buffers
- quit apropos buffers
- quit ert buffers
- hide neotree buffer

And more to come !
Expand Down
8 changes: 6 additions & 2 deletions evil-escape.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;; Author: Sylvain Benner <[email protected]>
;; Keywords: convenience editing evil
;; Created: 22 Oct 2014
;; Version: 1.5.1
;; Version: 1.5.2
;; Package-Requires: ((emacs "24") (evil "1.0.9") (key-chord "0.6"))
;; URL: https://github.com/syl20bnr/evil-escape

Expand Down Expand Up @@ -37,6 +37,7 @@
;; - quit magit buffers
;; - quit help buffers
;; - quit apropos buffers
;; - quit ert buffers
;; - hide neotree buffer
;; And more to come !

Expand Down Expand Up @@ -162,7 +163,10 @@ with a key sequence."
(lookup-key evil-motion-state-map (evil-escape--first-key)))
(let ((exit-func (lambda () (interactive)
(cond ((or (eq 'apropos-mode major-mode)
(eq 'help-mode major-mode)) (quit-window))
(eq 'help-mode major-mode)
(eq 'ert-results-mode major-mode)
(eq 'ert-simple-view-mode major-mode))
(quit-window))
((eq 'neotree-mode major-mode) (neotree-hide))
(t (evil-normal-state))))))
(eval `(evil-escape-define-escape evil-motion-state-map ,exit-func
Expand Down

0 comments on commit 5da641b

Please sign in to comment.