Vim: Modes
Vim has seven basic modes:
- Normal mode: In Normal mode you can enter all the normal editor commands. This is also known as command mode (not to be confused with Command-line mode).
- Visual mode: Like Normal mode, but the movement commands extend a highlighted area. When a non-movement command is issued, it is executed for the highlighted area.
- Select mode: I have no idea what this one is about.
- Insert mode: In insert mode, the text you type is inserted into the buffer.
- Command-line mode: In Command-line mode you can enter one line of text at
the bottom on the window. This is also known as Cmdline mode. It is used
for:
- the Ex command
:
- the pattern search commands,
?
and/
- and the filter command
!
- the Ex command
- Ex mode:
- Terminal-Job mode:
And there are seven additional modes (which are variants of the basic modes):
- Operator-pending mode:
- Replace mode:
- Virtual Replace mode:
- Insert Normal mode: Entered when
c+O
is entered in Insert mode. This is like Normal mode, but after executing one command Vim returns to Insert mode. If theshowmode
option is on-- (insert) --
is shown at the bottom of the window. - Terminal-Normal mode:
- Insert Visual mode:
- Insert Select Mode:
Resources
There is a lot of not-quite-accurate information about Vim modes floating around the Internet. It’s not so much wrong as incomplete and this is one area where I think completeness really helps.
So I turned to Vim’s own help, :help vim-modes
. What follows, more or less, is
me paraphrasing Vim’s help pages on modes.