branch: elpa/with-editor
commit 112603566fdb32ea2be361e7d859c61d3540be12
Author: justbur <[email protected]>
Commit: justbur <[email protected]>
Add remaps for common evil commands
These will only affect evil users. The commands correspond to the ZZ and
ZQ commands in normal state.
Ref https://github.com/justbur/evil-magit/issues/18
---
with-editor.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/with-editor.el b/with-editor.el
index 2e5d5dd..9f40b38 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -324,12 +324,14 @@ not a good idea to change such entries.")
(defvar with-editor-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map "\C-c\C-c" 'with-editor-finish)
- (define-key map [remap server-edit] 'with-editor-finish)
- (define-key map "\C-c\C-k" 'with-editor-cancel)
- (define-key map [remap kill-buffer] 'with-editor-cancel)
- (define-key map [remap ido-kill-buffer] 'with-editor-cancel)
- (define-key map [remap iswitchb-kill-buffer] 'with-editor-cancel)
+ (define-key map "\C-c\C-c" 'with-editor-finish)
+ (define-key map [remap server-edit] 'with-editor-finish)
+ (define-key map [remap evil-save-modified-and-close] 'with-editor-finish)
+ (define-key map "\C-c\C-k" 'with-editor-cancel)
+ (define-key map [remap kill-buffer] 'with-editor-cancel)
+ (define-key map [remap ido-kill-buffer] 'with-editor-cancel)
+ (define-key map [remap iswitchb-kill-buffer] 'with-editor-cancel)
+ (define-key map [remap evil-quit] 'with-editor-cancel)
map))
(define-minor-mode with-editor-mode