In vim, how do you scroll a buffer so the cursor location is centered in the screen?

This will center the current line

zz

Optionally you could set scrolloff to something large like 999 and the working line will always be in the center, except when you are towards the start or end of the file.

:set scrolloff=999

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)