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
    Commented Aug 13, 2017 at 14:40
  • 1
    @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. Commented Aug 13, 2017 at 14:44
  • 2
    A very quick google indicates that :bd is how one does this in vim, so.... the same, perhaps?
    – phils
    Commented Aug 13, 2017 at 22:36

1 Answer 1


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 and acknowledge you have read our privacy policy.

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