Move or jump to specific lines in vi
Navigating large files is an important capability when using any editor. The vi editor makes it easy to move around.
All of the following commands must be entered in command mode, not insert mode. Pressing ESC will ensure you are in command mode.
To jump to the end (last line) of a document:
G
To move to the first line of a document:
0G
This is a special case of the more general command to move to any specific line. To jump to the 3872nd line:
3872G






Add New Comment
Viewing 1 Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment