Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Command mode is the initial mode. Vim calls this Normal mode. Not to be confused with command-line-mode, which is what you get after you press :, /, ?, or !

Vim starts in normal mode (unless you :set insertmode in your .vimrc). In this mode Vim executes commands when you press keys on the keyboard. This is opposed to insert mode where pressing keys inserts text into the buffer.

Normal mode is often referred to as the command mode. The commands that can be performed in normal mode are vi commands (not to be confused with ex commands, see ).

You can leave the normal mode by pressing:

  • i to enter
  • v, V or Ctrl+v to enter
  • Q to enter
  • gh, gH or gCtrl+h to enter
  • /, ?, ! or : to enter commands in command-line-mode and then return to normal mode.

See also:

history | excerpt history