Vim - Mode

> Integrated development environment (ide) > Text Editor - Vi (VIM)

1 - About

The Vim editor is a modal editor and behaves then differently, depending on which mode you are in. The two basic modes are called:

  • Normal mode (Default - ESC) - In Normal mode the characters you type are commands.
  • Insert mode (i) - In Insert mode the characters are inserted before the character under the cursor.

Others mode:

  • Append mode (''r''). In Append mode the characters are inserted after the character under the cursor.
  • Replace mode ?
Advertising

3 - Modes

3.1 - Insert

  • Tape i to enter in Insert Mode and type your text and made modifications
Hello Nico
  • The screen must be like this

  • Press the ESC button to leave the insert mode and to enter/return in a normal mode

3.2 - Normal

The normal mode (ESC) is the default one where you can execute commands.

To get back to Normal mode, no matter what mode you are in, press the Esc key. Sometimes you have to press it twice. If Vim beeps back at you, you already are in Normal mode.

3.3 - Append

  • Append mode (r). In Append mode the characters are inserted after the character under the cursor.

3.4 - Other

4 - Management

4.1 - Configuration

  • Show where set
:set showmode
Advertising

4.2 - Switching

Command Description Mode Note
i Go to insert Mode Normal
ESC Return to Normal Mode Any