Amina
Amina

Reputation: 404

Vi on freeBSD : stuck into "ex input mode"

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?

Upvotes: 10

Views: 8438

Answers (3)

jones
jones

Reputation: 1

I FOUND IT. I just spammed everything while pressing the control key. press "control z" and it will suspend vi

Upvotes: 0

Ilan
Ilan

Reputation: 664

In ex input mode you type line by line and see these lines at the bottom of the screen. When you done simply type a new line consist of single period (.). This will take you out of the ex input mode.

Hope this help!

Upvotes: 21

Ingo Karkat
Ingo Karkat

Reputation: 172608

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.

Upvotes: 34

Related Questions