HELPFUL VI EDITOR COMMANDS

$ vi <filename>

to edit the file named <filename>

i

insert text

ESC

<F11> finished inserting text - press the ESC

a

append text after character where the cursor is located

o

insert new line

dd

erase line

dw

delete word

x

delete character

r

replace character

R

replace characters until ESC

s

replace character and insert text

ZZ

write the file and exit

:wq or :x

write a new version of the file and exit

:q!

quit (I messed up and donít want to save this version of the file)

:r <file>

read in file <file> into the current file being edited

:e <file>

edit file