开发者

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

开发者 https://www.devze.com 2022-12-17 11:44 出处:网络
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

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消