Timur Fayzrakhmanov
Timur Fayzrakhmanov

Reputation: 19587

How to go back in ex mode from vi?

I'm learning vi/vim. Recently, I've faced with some uncertain point. When I run:

ex somefile

The ex editor opens. Ok, good. After some play I run:

:vi

Now I'm in normal vi mode. Everything is clear here. But the question is: How can I go back to ex mode (the first time I run ex filename from bash)? I've tried [shift]+[q] (hence Q), but nothing happens.

Upvotes: 1

Views: 992

Answers (1)

the_velour_fog
the_velour_fog

Reputation: 2184

You didn't say what version of vim you were using, but the help (:help ex-mode) does say this:

Note: In older versions of Vim "Q" formatted text,
that is now done with gq. But if you use the
vimrc_example.vim script "Q" works like "gq".

So you could try gq in normal mode or help also says

gQ Switch to "Ex" mode like with "Q", but really behave
like typing ":" commands after another.

In that case you could try gQ from normal mode.

Upvotes: 3

Related Questions