Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve closing with-editor buffers in evil-mode #2561

Closed
wbolster opened this issue Feb 22, 2016 · 4 comments
Closed

improve closing with-editor buffers in evil-mode #2561

wbolster opened this issue Feb 22, 2016 · 4 comments
Labels
enhancement New feature or request

Comments

@wbolster
Copy link
Contributor

closing a with-editor buffer while using evil-mode is a bit clunky because it expects the user to use C-c C-c or C-c C-k to either finish or cancel the operation. this does not feel very evil. :)

with vim-fugitive (vim git integration) i always typed ZZ or ZQ to close the buffer, which in evil translates to

  • (evil-save-modified-and-close), bound to ZZ
  • (evil-quit), bound to ZQ

perhaps the mode map can be extended to include

(define-key map [remap evil-save-modified-and-close] 'with-editor-finish)
(define-key map [remap evil-quit] 'with-editor-cancel)

(fwiw, i'm an emacs newbie, so please point out my mistakes, if any).

@wbolster
Copy link
Contributor Author

as a work-around i currently have this in my init.el:

(evil-define-key 'normal with-editor-mode-map
  "ZQ" 'with-editor-cancel
  "ZZ" 'with-editor-finish)

@kyleam
Copy link
Member

kyleam commented Feb 22, 2016

I'm closing this in favor of the issue you opened with evil-magit. I don't see anything to be done on Magit's end.

@kyleam kyleam closed this as completed Feb 22, 2016
@wbolster
Copy link
Contributor Author

ok, fair enough

@wbolster
Copy link
Contributor Author

@kyleam maybe you can chime in on the discussion on emacs-evil/evil-magit#18 for a sec? thanks!

@tarsius tarsius added the enhancement New feature or request label Feb 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants