All Neovim modes
Table of Contents
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.
Mode | What it does | How to enter |
---|---|---|
Normal | The default mode, allows navigation | Esc from another mode |
Insert | Editing text | i ,o ,a , etc. |
Visual | Used to select regions of text | v for char, V for line |
Visual-Block | Special select mode where a rectangular block can be selected | Ctrl-v |
Command-Line | When you enter commands after typing | : |
Ex | Continuous command line, | gQ to enter vi to exit |
Terminal | Gives you access to the terminal, i.e. bash etc. | :terminal |
Operator-Pending | In-between state, after an operator see operators, before motion | gq pause ap see reformat |
Insert-Normal | From Insert, run a single Normal mode command | Ctrl-o when in insert |
Insert-Visual | From Insert, make a selection then return to Insert | Ctrl-o then v or V for visual |
Insert-Select | From Insert, | Ctrl-o gh |
Replace | From Normal, character based text editing, replace text rather than insert see replacing] | R |
Virtual-Replace | From 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