[NCLUG] vi[m] vs. "z<CR>", "z.", and "z-" for vertical scrolling

Gabriel L. Somlo gsomlo at gmail.com
Mon Dec 9 11:16:45 MST 2019


Been using vi for a while, and over the last year or two (at least
several months) I started noticing how when trying to put the current
line to either top or bottom of the screen ("z<enter>" or "z-"), it
actually goes only to 5 lines below top (or above bottom), not
actually *all the way* to the top or bottom.

Today I finally got annoyed enough by it to google for why this might
be, or why the behavior might have been changed, but as it turns out,
my google-fu is particularly weak today, and I can't even come up with
a decent query articulating what I'm looking for :)

All I'm getting is results telling me that if I hit those key
combinations, my text would be scrolled with the current line to the
top/middle/bottom of the screen, which I knew already. Nothing about
"five lines away from the actual intened target", and where that's
coming from.

Anyone able to shed some light on this mystery? :)

Thanks,
--Gabriel


More information about the NCLUG mailing list