Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move cursor to end of file in vim

Tags:

vim

People also ask

How do I move the cursor to the last line in vi editor?

Moving to Start or End of Line Press ^ to move the cursor to the start of the current line. Press $ to move the cursor to the end of the current line.

How do I jump to the end of a line in Vim?

We may need to end the last line from anywhere in the file. Even the cursor has located the start of the file you can move the end of the last line with the following steps. Press the ESC key. Press G to move the last line and press $ to move the end of the line.

How do you go to the bottom of a file in vi?

Esc + Shift + Colon to get to the : prompt. Then type any integer and ENTER to jump to that line number or... $ to jump to the end line of the file.


This is quicker. Just use this

:$

No need to explicitly go to the end of line before doing a, use A;
Append text at the end of line [count] times

<ESC>GA


Hit Esc and then press: Shift + G


For starters, there's no need for the return. G$ will do. And you're being misleading by counting <Esc> and a in the length of a normal mode command.

However, you can use Ctrl + End if you like.


Go to Top - Double g

Go to Bottom - Shift + g


I thought the question was "Move cursor to end of file in vim" ?

End-of-file: Esc + G
Begin-of-file Esc + g (or gg if you are already in the command area)