Three modes of vi editor
Three vi editor modes users must know
1. Insert Mode: edit text
2. Command Mode: move cursor, cut, paste, copy and etc.
3. Execution Mode: save, exit and other complicated functions
Mode conversion of vi editor
The following figure shows the mode conversion of vi editor is fixed:
Insert Mode < —– > Command Mode < —– > Execution Mode
Insert Mode cannot be directly converted to Execution Mode but must be converted to Command Mode first then to Execution Mode and vice versa. Command Mode comes first when entering to vi.
The following table shows how to convert modes of vi editor:
|Command → Insert||Use the following keys: a,A,o,O,i,I,r,R|
|Insert → Command||Use ESC key|
|Command → Execution||Use “:” key then enter in required command|
|Execution → Command||Be back to Command Mode when finishing command execution or use ESC key directly.|