I play the great game called VIM adventures (from which are the images bellow). The question is from the game, but is also reproducible in VIM so this is the place I ask.
Assume you are in
normal mode, standing on some line
n and column
m. If you press key
j, your position becomes line
n+1 and same column
m. If the line
n+1 has less columns than
o, you are placed at column
o. Again press
j. You are moved to line
n+2, on column
m (same check as before). See, column you started at,
m, is remembered. This can be seen on the first image, with red lines representing
However, if you are in
normal mode and press key
$, you are moved to the end of the current line. Now consider the same sequence of movements as desribed in paragraph before. Each movement
j will move you to the last character on that line.
m is not remembered in this case. This can be seen on the second image. By pressing first
$, coursor is placed at the end of the first line. Then, by pressing multiple
j movements, each lands coursor on the end of line, ignoring
m, which was remembered in the first paragraph.
I can't find this in any VIM documentation. Can you explain me how this remembering mechanism works or point me to the part of documentation which explains this ?