DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far...

Welcome! This is a Q&A website for computer programmers and users alike, focused on helping fellow programmers and users. Read more

What are you stuck on? Ask a question and hopefully somebody will be able to help you out!
+2 votes

I need to select everything from the current line to the end of the file. What I'm doing: 1. Ctrl+V select the current line in visual mode, 2. hold Page Down until the cursor reaches the end of the file. The problem is that the file is very large and it takes minutes to scroll all the way to the bottom. There must be a smarter way to do this.


1 Answer

+3 votes
Best answer

Shift+g is your friend. It jumps to the last line of a file in normal mode, in visual mode it will select everything along the way.

Edit: I should clarify it works best with Shift+v line select, with Ctrl-v and only left/right arrow keys it might constrain to the column width of the starting line, which is likely not what you're looking for.

selected by

Adding to this answer: gg navigate to beginning of the file, G end of file, nG to specific line.

Contributions licensed under CC0