Understanding Three Mode of VI Editor

Understanding Three Mode of VI Editor

VI refers to "Visual Editor". VIM is an improved version of VI Editor. The VI editor is the standard editor under Linux system.

Opening the file:

You can use the command written below to open or edit an existing file. If the file doesn't exist, VI creates it when the edits are saved for the first time

vi <filename>

Three modes of VI and VIM

Here are the results from this week's race:

S. NoModesDescription
1Command ModeA Default Mode
2Insert ModeType in new text
3Ex ModeEnter extended commands

Cursor Movement in Command Mode

S. NoMovements
1h left
2j down
3k up
4.l right
5.w word ahead
6.b word back

Entering into Insert Mode

CommandMovements
aappend after the cursor
iinsert. before the cursor
oopen a line below
A.append to end of the line
I.insert at beginning of line
O.open a line above

Leaving Insert Mode:

CommandMovements
EscTakes you from insert mode back to command mode

Change, Delete and Yank

ChangeDeleteYank(Copy)
Lineccddyy
Letterc1d1y1
Wordcwdwyw
Sentence aheadc)d)y)
Sentence behindc(d(y(
Paragraph abovec{d{y{
Paragraph belowc}d}y}

Did you find this article valuable?

Support Gurviraj Singh by becoming a sponsor. Any amount is appreciated!