vi

G go to last line
gg go to first line

a Append after cursor
i Insert before cursor
o Open line below
O Open line above
:r file Insert file after current line

substitute :%s/apple/pear/g
r replace a single character
R replace multiple characters untir ESC is pressed

copy a line yy or Y ("yank") and either p ("put below") or P ("put above").
delete a line dd
x delete a single character under cursor

exit and saveĀ  :wq
exit without savint :q!