Como alternativa, você pode usar os comandos vim que se referem a scrolling relative to cursor
. Alguns deles têm a vantagem de deixar o cursor na mesma coluna da linha de origem. A partir do vim
help ( :help zz
):
z Redraw, line [count] at top of window (default cursor line). Put cursor at first non-blank in the line.
zt Like "z", but leave the cursor in the same column. {not in Vi}
z{height} Redraw, make window {height} lines tall. This is useful to make the number of lines small when screen updating is very slow. Cannot make the height more than the physical screen height.
z. Redraw, line [count] at center of window (default cursor line). Put cursor at first non-blank in the line.
zz Like "z.", but leave the cursor in the same column. Careful: If caps-lock is on, this command becomes "ZZ": write buffer and exit! {not in Vi}
z- Redraw, line [count] at bottom of window (default cursor line). Put cursor at first non-blank in the line.
zb Like "z-", but leave the cursor in the same column. {not in Vi}