vi Commands – Moving the Cursor

j or <Return>
[or down-arrow]
move cursor down one line
k [or up-arrow]move cursor up one line
h or <Backspace>
[or left-arrow]
move cursor left one character
l or <Space>
[or right-arrow]
move cursor right one character
0 (zero)move cursor to start of current line (the one with the cursor)
$move cursor to end of current line
wmove cursor to beginning of next word
bmove cursor back to beginning of preceding word
:0<Return> or 1Gmove cursor to first line in file
:n<Return> or nGmove cursor to line n
:$<Return> or Gmove cursor to last line in file