Vim includes a group of motions that move the cursor vertically relative to the screen:
Command | Action |
---|---|
H | cursor to line N from top of screen |
M | cursor to middle line of screen |
L | cursor to line N from bottom of screen |
Here is a brief demonstration of these commands and how they behave:
Initial Conditions
Siddhartha
by·Herman·Hesse
THE·SON·OF·THE·BRAHMAN
In·the·shade·of·the·house,·in·the·sunshine·of·the·riverbank·near·the
boats,·in·the·shade·of·the·Salwood·forest,·in·the·shade·of·the·fig
tree·is·where·Siddhartha·grew·up,·the·handsome·son·of·the·Brahman,·the
NORMALTop1:1
Move the cursor to bottom of screenL
Siddhartha
by·Herman·Hesse
THE·SON·OF·THE·BRAHMAN
In·the·shade·of·the·house,·in·the·sunshine·of·the·riverbank·near·the
boats,·in·the·shade·of·the·Salwood·forest,·in·the·shade·of·the·fig
tree·is·where·Siddhartha·grew·up,·the·handsome·son·of·the·Brahman,·the
NORMAL90%9:1
Move the cursor to middle of screenM
Siddhartha
by·Herman·Hesse
THE·SON·OF·THE·BRAHMAN
In·the·shade·of·the·house,·in·the·sunshine·of·the·riverbank·near·the
boats,·in·the·shade·of·the·Salwood·forest,·in·the·shade·of·the·fig
tree·is·where·Siddhartha·grew·up,·the·handsome·son·of·the·Brahman,·the
NORMAL50%5:1
Move the cursor to top of screenH
Siddhartha
by·Herman·Hesse
THE·SON·OF·THE·BRAHMAN
In·the·shade·of·the·house,·in·the·sunshine·of·the·riverbank·near·the
boats,·in·the·shade·of·the·Salwood·forest,·in·the·shade·of·the·fig
tree·is·where·Siddhartha·grew·up,·the·handsome·son·of·the·Brahman,·the
NORMALTop1:1