Centaur.vim defines a Vim operator to vertically center the block of lines defined by a motion command on the screen. That is, the matching lines will be scrolled nicely into view.
For example, to vertically center a paragraph, you'd type gzip
(gz
for the operator, and ip
for "inner paragraph").
When the block of lines defined by the motion command is larger than the viewport, the first line of the block is scrolled to the top of the viewport.
If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/tommcdo/vim-centaur.git
Once help tags have been generated, you can view the manual with
:help centaur
.