Vi on freeBSD : stuck into "ex input mode"

Amina picture Amina · May 6, 2014 · Viewed 7.2k times · Source

I'm stuck in a file. I used vi to edit this file, and I tried to quit, but I got a message like "Entering ex input mode". It doesn't work if I press Escape, it writes ^[ in my file.

How can I properly close my file now?

Answer

Ingo Karkat picture Ingo Karkat · May 6, 2014

The :visual command gets you out of it.

If your vi is actually Vim, you can find that information via :help Ex-mode, listed under the Q command, which gets you into that mode.