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.
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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With