VI EDITOR COMMANDS

VI EDITOR COMMANDS

$vi file1

Default mode will escape mode

If u want switch into insert mode

We have commands

I : Current position insert mode

A : at the end of the line insert mode

a: next to the current position insert mode

s: it deletes current position and switch into insert mode

escape mode

dd: to delete entire line

d: delete single digit

x=delete single digit

yy: to copy entire line

p: paste the lines to below to the cursor position

P: paste the lines to above the cursor position

gg: To switch starting position

G: to switch ending position

dw:  delete one word

Small r: replace single character

R: replace all characters

:se nuà to set the numbers

:w->saving

:qàq

:wqàsave and quit

:wq!–>forcefully save and quiting

:q!–>forcefully quitting

Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (10 votes, average: 4.90 out of 5)
Loading...

One thought on “VI EDITOR COMMANDS

Add Comment