Introduction to Vim Modes

The first key vim concept to understand is modes.

You can switch between two primary modes: normal mode and insert mode to perform different actions.

Normal Mode

Used for:
  • Moving the cursor
  • Deleting characters, words, lines, etc
  • Performing operations like Copy / Paste
const test = 1;
function sendGreeting() {
console.log("Hello, asdfasdf world!");
"complete jibberish line";
}
 





Insert Mode

Used for editing and inserting text.

You can think of insert mode as the default behavior in the editors you are already used to.

const test = "";
 

Pressing the same key can have different effects depending on which mode you are in. For example:

  • the w key in normal mode moves the cursor forward one word
  • the w key in insert mode types the character "w"

In the next few lessons, you will learn the basics of each mode and how to switch between them.