First page Back Continue Last page Image

Commands for the vi editor

Key Action

i Insert at cursor (goes into insert mode)

a Write after cursor (goes into insert mode)

A Write at the end of line (goes into insert mode)

ESC Terminate insert mode

u Undo last change

U Undo all changes to the entire line

o Open a new line (goes into insert mode)

D Delete contents of line after the cursor

C Delete contents of a line after the cursor and insert new text.

4dw Delete word

cw Change word

x Delete character at the cursor

r Replace character

R Overwrite characters from cursor onward

s Substitute one character under cursor continue to insert

S Substitute entire line and begin to insert at the beginning of the line

~ Change case of individual character

These commands are entered from command mode

Using vi too much will make you feel like this