I'm using emacs in terminal mode. I open it up and then use c-x c-f to edit a file.

I'm using evil mode so I then use :x to save and exit. I end up leaving emacs all together. Is there something else I can do here so that I just close the file?

  • In vi :x writes the file and exits the editor, so I would say that's 100% expected behaviour for the same command in emacs when using evil. – phils Aug 13 '17 at 14:40
  • @phils not saying it's not the correct behavior. It's just that in emacs I more often want to close a buffer and keep emacs open so I can run additional commands. – Philip Kirkbride Aug 13 '17 at 14:44
  • 1
    A very quick google indicates that :bd is how one does this in vim, so.... the same, perhaps? – phils Aug 13 '17 at 22:36

I don't know much about evil, but the usual emacs function is kill-buffer, and it's normally bound to C-x k. C-h f kill-buffer will show you what key (or keys) it's bound to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.