Skip to main content
  1. Posts/

All Neovim modes

·343 words·2 mins

This is going to be a quick post just to show all modes, as a quick internet search was more miss than hit for me.

ModeWhat it doesHow to enter
NormalThe default mode, allows navigationEsc from another mode
InsertEditing texti,o,a, etc.
VisualUsed to select regions of textv for char, V for line
Visual-BlockSpecial select mode where a rectangular block can be selectedCtrl-v
Command-LineWhen you enter commands after typing:
ExContinuous command line,gQ to enter vi to exit
TerminalGives you access to the terminal, i.e. bash etc.:terminal
Operator-PendingIn-between state, after an operator see operators, before motiongq pause ap see reformat
Insert-NormalFrom Insert, run a single Normal mode commandCtrl-o when in insert
Insert-VisualFrom Insert, make a selection then return to InsertCtrl-o then v or V for visual
Insert-SelectFrom Insert,Ctrl-o gh
ReplaceFrom Normal, character based text editing, replace text rather than insert see replacing]R
Virtual-ReplaceFrom Normal, screen column based replace rather than pure character based [see replacing]{#replacing)gR

Note: if there is a “see xyz” link above, it relates to the xyz section below (where xyz is a placeholder)

Operators #

See Neovim’s online help for more info on operators

Reformat #

gqap is reformat text around paragraph. The Operator pending mode happens after gq (the operator) but before the ap (motion).

Replacing #

Replace and Virtual-Replace have subtle differences, where in Replace mode you can start inserting i.e. when you reach the end of the line and carry on typing, you won’t replace the newline you will just insert text onto the end of that line. Also, the behaviour differs when it comes to replacing tabs, in Replace mode it will replace the tab completely, so if your tab width is 4 characters, your line will shrink by 3 characters if you replace the tab with a regular character. Visual-Replace will ensure the number of columns in the line remains the same.

I found these in the Neovim manual