AlbertMunichMar
AlbertMunichMar

Reputation: 1866

How to exit Ex mode in vim (typing :visual does not work)

I don't know how to exit Ex mode in vim. I think I tipped something that is still open and don't know how to close it:

<uments/LeWagon/Teacher_Lessons theory.rb                                                                                                                                            
Entering Ex mode.  Type "visual" to go to Normal mode.
:w
"theory.rb" 22L, 472C written
:i
:w
:q
visual
:visual
visual
^W^W^W^W^K^W
kj^W
exit
:exit
:visual
visual

Thanks

Upvotes: 20

Views: 12306

Answers (1)

Ry-
Ry-

Reputation: 224942

You got into insert mode inside Ex mode with :i, so you need to leave it with a line containing only a period:

.

Then :visual will work.

In other words: Enter . Enter v i s u a l Enter. ^C should also work, i.e. Ctrl+C v i Enter.

Upvotes: 44

Related Questions