Final answer:
Use the command gg in vi to quickly move the cursor to the top of the page. This command is executed in command mode and provides a fast way to jump to the beginning of the document.
Step-by-step explanation:
The main answer to your question: To quickly go to the top of the page while editing a document using vi, you would use the command gg. The commands in vi serve different purposes; gg moves the cursor to the first line of the document, G moves to the last line, and 1G has the same effect as gg. The command Ctrl+g will display the current position in the file, but will not move the cursor.
An explanation on how to use these commands: While in command mode (not insert mode), simply pressing the keys for these commands will execute the desired action. For example, pressing gg will take you directly to the top without having to scroll manually.