Understanding Three Mode of VI Editor

Gurviraj SinghGurviraj Singh
2 min read

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}
0
Subscribe to my newsletter

Read articles from Gurviraj Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Gurviraj Singh
Gurviraj Singh

I am an IT enthusiast currently studying at Christ Academy Bengaluru. I love Linux and passionate about the gaming platforms.