Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


i am someone1.
i am someone2.
i am someone3

Documentation says G takes me end of the file, but it only takes me to the beginning of last line. I want to be able to come to last character of the file, 3 in this case, and press a and type a period.

How do I do that?

share|improve this question
up vote 21 down vote accepted

If you type A after G you will enter insert mode at the end of the last line.

If you just want to go to the last character, then G-End will suffice

share|improve this answer
A then G is fine for me. But if I don't want to edit, is G-End the only option? Is there a single key to do this instead of two? – Nanda Feb 3 '12 at 17:11
Not that I am aware of, but that is no guarantee. You can always create your own map if you like. – Bernhard Feb 3 '12 at 17:17
Thanks Bernhard for the help! – Nanda Feb 3 '12 at 17:21

G goes to the last line and $ goes to the last character of the line, so

share|improve this answer
Gilles, Thanks this is more of what I was looking for. – Nanda Feb 4 '12 at 0:58

Ctrl+End also works, in both normal and insert modes. :help <C-End>

share|improve this answer
This only moves the cursor to the last character in the current line. – sebix Oct 6 '15 at 11:15
@sebix: No, check the help. – Kurt Hutchinson Oct 6 '15 at 22:02
Does not work for me with vim 7.4 – sebix Oct 7 '15 at 13:01
@sebix: It works for me just fine, and the help text is pretty clear. Maybe you have some mapping or plugin that is overriding the built-in behavior. – Kurt Hutchinson Oct 7 '15 at 19:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.