Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using putty to view a 30+MB file in vi on a Linux server, and I have to use PgDn to scroll to the bottom of the page. I realize I can use tail but I want to be able to move up and down the file with it open in vi. Is there not a way to go to end of file or top of file immediately using a keyboard shortcut?

share|improve this question

migrated from stackoverflow.com Jan 2 '13 at 7:56

This question came from our site for professional and enthusiast programmers.

3 Answers 3

The answer is a simple G in normal mode. That is capital G, not g.

You can also open a file and directly go to the end of it using:

vim +$ thefile
share|improve this answer
And to get back to the beginning use gg. –  Keith Jan 1 '13 at 21:46

The key for the end of file is G (uppercase g).

See vi cheat sheet, for example.

share|improve this answer

Type vimtutor or inside the editor :help

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.