Onivim, like Vi and Vim, is a modal editor - meaning it operates in different modes.
The default mode for Onivim, like Vi and Vim, is normal mode. Normal mode is a command mode; characters you type execute commands (like moving the cursor, deleting text, etc). This is much different from modeless editors; where typing always inserts text! The advantage of having modes is that you can navigate through code, manipulate text swiftly, and even manage selections without your hands leaving the keyboard.
'Normal' mode seems counter-intuitive - coming from other modeless editors, the 'normal' mode seems like it should be inserting characters! However, when working with text, the majority of our time is spent navigating, manipulating, and editing - rather than inserting. For this reason, the 'normal' mode is the default mode.
In normal mode, you can move the cursor around:
h- move the cursor left
j- move the cursor down
l- move the cursor right
k- move the cursor up
You can also prefix these characters with a number, for example:
5jmoves the cursor 5 lines down
10lmoves the cursor 10 lines right
Even though we spend a lot time in normal mode, we need to be able to type and insert text, too. To enter insert mode, you can press
i from normal mode.
The cursor will switch to a caret, and you'll see an indication in the status bar that we are now in insert mode.
Once you have finished typing, you can press
Control+[ to return to normal mode - pick whichever one is most comfortable for you.
Play around with switching between insert mode and normal mode, and when you're ready, let's dive-in to some more advanced editing: