Move cursor to end of file in vim

vim
user1322720 picture user1322720 · Jun 9, 2013 · Viewed 620.2k times · Source

When I want the cursor to go to the end of the file (i.e. the end of the last line) in Vim, I have to type six keystrokes:

<ESC>G$a - which translates to ESC + Shiftg + Shift4 + a on my keyboard layout.

How can I do this more efficiently?

Since I regularly work on many different machines, I cannot always change .vimrc, so I'm looking for answers without having to edit or create that file.

Answer

karthik picture karthik · Aug 20, 2014

This is quicker. Just use this

:$