Skip to content
Natalie Perret
Go back

Learning Neovim > 3: Insert & Visual Modes

Neovim is a modal editor — every mode has a distinct purpose. This article covers the three modes you’ll use alongside Normal mode: Insert, Visual, and Command.

Table of contents

Open Table of contents

Insert Mode Variants

Entering Insert mode is intentional; there are several entry points depending on where you want the cursor:

KeyAction
iInsert before current character
aInsert after current character
AAppend at end of line
oOpen new line below + enter Insert mode
OOpen new line above + enter Insert mode
EscReturn to Normal mode

Visual Mode

Visual mode lets you select text before applying an operator.

KeyAction
vStart character-wise visual selection
VStart line-wise visual selection
rReplace 1 character under cursor
REnter Replace mode (overwrite continuously)

After selecting with v or V, apply any operator — d to delete, y to yank, c to change.

Command Mode (:)

Command mode accepts Ex commands. Press : from Normal mode to enter it.

CommandAction
:wSave file
:wqSave and quit
:q!Quit, discarding changes
:s/the/gcSubstitute on current line with confirm
:%s/the/Athe/gcGlobal substitution across the whole file

Tips


Share this post on:

Previous Post
Learning Neovim > 2: Editing Operators
Next Post
Learning Neovim > 4: Search & Replace