vi的两种状态,命令模式(执行命令)和插入(编辑文本)模式

As mentioned earlier, the concept of the current “mode” is fundamental to the way
vi works. There are two modes, command mode and insert mode. You start out in
command mode, where every keystroke represents a command. In insert mode, every-

thing you type becomes text in your file.


Sometimes, you can accidentally enter insert mode, or conversely, leave insert mode
accidentally. In either case, what you type will likely affect your files in ways you did
not intend.
Press the ESC key to force vi to enter command mode. If you are already in command
mode, vi will beep at you when you press the ESC key. (Command mode is thus
sometimes referred to as “beep mode.”)
Once you are safely in command mode, you can proceed to repair any accidental
changes, and then continue editing your text.

多按个 ESC 键,没错,可以保证处于命令模式状态.

你可能感兴趣的:(vim学习,vi)