Move cursor to start/end of line in vim

Published on


I can't believe it's taken me this long of using vim before I finally looked this up. I've just been moving my cursor with the arrow keys. Which, as you can imagine, gets very repetitive and annoying for long lines.

You can use I or A (in normal mode, so hit Esc first) to move the cursor to the start or end of the current line and immediately enter insert mode.

All credits to this StackOverflow answer for enlightening me.