gg gqG 
g means : go to the beginning of buffer;
gq means :

Set textwidth to 80 (:set textwidth=80), 
move to the start of the file (can be done with Ctrl - Home or gg), 
and type gqG. 
gqG formats the text starting from the current position and to the end 

