zz
moves current line & cursor at the middle of the screen.
zt
moves current line & cursor at the top of the screen.
Is there a way to do the same as zz
and zt
, but for a quarter (25%) from the screen top?
Here is what I came up with so far:
map <silent> <expr> zT "zt" . (&scroll / 2) . "\<c-y>"
But it does not do exactly what I want, because if there are wrapped lines that take for example 10 visual lines, one stroke of <c-y>
will go over those 10 visual lines in one go.