wyc
wyc

Reputation: 55273

How to make Vim return from insert mode to normal mode after a command is finished?

When Vim is in Insert mode and you press Ctrl-O it switches to normal mode for one command, then switches back to insert mode when the command is finished. Is there the opposite command? To switch to insert mode for typing a word (or a number of letters or a line), then switch it back to normal mode when the typing is finished?

Upvotes: 6

Views: 2243

Answers (1)

Randy Morris
Randy Morris

Reputation: 40927

Not that I know of, however, if you are repeating the same operation over and over again you can fake it by using the . command in normal mode after you've made the change once.

An alternative (in the same scenario) would be to record a macro and run it from normal mode.

Upvotes: 4

Related Questions