Skip to content

Search content

Learning Neovim > 3: Insert & Visual Modes

Learning Neovim Part 3
Three panels labelled Normal, Insert, and Visual in pink, cream, and plum.

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

On this page

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

Share this post

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