vi Editor: Commands: Movement
Below is a list of useful commands to move around in the file. Note that they work only in "visual" state. NOTE: any vi command may be preceded by a positive repeat factor (e.g. typing "20j" is just like typing "j" twenty times)
- h - backwards (left)
- j - next line, same column
- k - previous line, same column
- l - forwards (right)
- - next line, at first non-blank
- ^ - beginning of line
- $ - end of line
- H - top of screen
- L - bottom of screen
- G - end of file
- ^B - back one screenful
- ^F - forward one screenful