How do I move to end of line in Vim?

salt.racer picture salt.racer · Sep 19, 2008 · Viewed 770.6k times · Source

I know how to generally move around in command mode, specifically, jumping to lines, etc. But what is the command to jump to the end of the line that I am currently on?

Answer

dvorak picture dvorak · Sep 19, 2008

Just the $ (dollar sign) key. You can use A to move to the end of the line and switch to editing mode (Append). To jump the last non-blank character, you can press g then _ keys.

The opposite of A is I (Insert mode at beginning of line), as an aside. Pressing just the ^ will place your cursor at the first non-white-space character of the line.