3

I am trying to make transition from vim to emacs (specifically doom-emacs). I was using term mode and habitually used vim in an attempt to edit another file forgetting that I was inside emacs.

I tried exiting vim with :wq but : is taken by evil being interpreted as emacs command, and while ZZ should work, I don't want my works to be saved in my case.

People recommended me to kill vim outside emacs or exit term mode, and that's working. However, I am wondering whether there's a proper way to exit vim and go back to shell inside emacs term mode.

2 Answers 2

1

If ZZ works for you, but the problem is that you don't want work saved, you can use ZQ to quit without saving.

1
  • With an addition, that if vim is in insert mode, press C-c C-c to send Ctrl-C to vim to exit insert mode.
    – Yao Wei
    Commented Jun 8, 2020 at 1:34
3

Just turn off Evil mode so that the vim keybindings won't get interpreted globally by Emacs.

1
  • This actually was an obvious solution that I overlooked - ty sir. Oh, and to get back to evil-mode, for me, was to hit M-x and type evil-mode Commented Oct 5, 2022 at 17:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .